Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exporting from a datawindow form 1

Status
Not open for further replies.

wainot

Programmer
Mar 2, 2005
8
0
0
US
i have a data window that shows everything correctly when i run it in powerbuilder. but when i export it to a text file, excel sheet or anything else, the headers don't show up correctly and the number of decimals are not correct. I can see in the form there is a Column Specification window and under name it has compute_0003 to compute_0007. Those are the names that show up in the header. I was wondering how do you change the name in this window since it's greyed out. Also under type it has decimal(8), how do I change this value to decimal(2). Thank you for looking and hopefully help on this.
 
In the datawindow painter you can change the 'compute_0003' name to something more meaningful by selecting the column itself and editing its name in the properties section.

The easiest way to change the decimal(8) designation (especially if you have a bunch of them to change) is to export the datawindow object, edit the exported text file (change 8 to 2), save it and re-import it.
 
thank you mbalent for your response.

i have changed the name in the properties field. this doesn't make a difference at all. this shows up correctly in the form. only when i export it, it doesn't show up correctly. also when i change the name from compute_0003, it changes my formula at the bottome and makes it invalid.

i will try the export and import method and let you know the results.

 
mbalent, i was able to change the name and decimal place points after i exported. it looks more clearer to me in text :)

i got one more question. when i export the file now, the heading and decimals are correct. but it's not aligned correctly. is there any place where i can align it. in the powerbuilder form it still looks correct.
 
There is an 'alignment' property which is an enumerated data type. I don't know the values for right, left, center off the top of my head so you will have to experiment in your export file.
 
If all your column names are less than 8 characters, you will have allignment you expect in text file after exporting a datawindow. Otherwise header allignment won't meet your expectation (in tab delimited text file). It will be OK in Excel though. Choose short names (less than 8 characters) for columns.

Arnold

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top