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!

Alignment

Status
Not open for further replies.

Kennymc

Programmer
Jun 4, 2003
35
0
6
US
Trying to import data from an Excel file that has many Order headers and Order lines. I need to convert it into a fixed length text file so I can import the information into our accounting system. Unfortunately the import is fixed width and dependent on the column position. I have it working with one problem I have the order header information in group header#1 were the first two columns start with "SO". I have the lines in the details section and each line starts with "SL". When I do the export to text everything is there except the lines always start in Column 2 instead of column 1.
Therefore the entire order line is off one position. I can manually delete the space in the text file and do the import but trying to resolve the issue. Any suggestions? Both the "SO" and "SL" fields are inserted text objects and not imported from the data file
 
How does Crystal Reports fit into this? Are you using the Excel file as a data source and then trying to format it in Crystal for the import by your accounting system?

Be sure to attach all fields AND the text boxes to guidelines. Then also right click in design mode and select all fields and objects by section and right click->format fields->make same height->then also choose align bottoms and then also select "fit to section" (another right click).

-LB
 
yes, using Excel as a data source - File downloaded from the web then massage it with Crystal reports so it is accepted by our accounting system. Using Crystal Reports 9. When you preview it in Crystal it looks correct but export it to a text document it adds a blank space at the beginning of the detail line
 
Did you use the guidelines? If header and detail fields are attached to the same guidelines, sized with the same height, with bottoms aligned, they should be aligned when exported. Make sure that the export uses the group header or detail section to define column width in the export options.

-LB
 
Did as suggested, exports perfectly to PDF, but to text it still adds a blank line
 
Are the "SO" or "SL" the only contents of the text boxes? If so, try replacing them with a formula, e.g.,

"SO"

Again, use the method described earlier to align.

If there are other contents in the text boxes, test the alignment by moving the guidelines and make sure the boxes are attached. Also, are you sure there isn't a leading space before the contents?

-LB
 
I tried more data and realized that only the very first line starts in column 1. Any lines after that start in column 2
So If I have more than one header line the "SO" will start in column 2
 
Another option is to build one formula (which could be constructed from multiple sub-formulas) that creates the output line with all of the spacing required. Then you're exporting a single field and you don't have to line anything up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top