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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

spaces are truncated when exporting as .txt file

Status
Not open for further replies.

lymi6977

IS-IT--Management
Jan 14, 2005
16
US
I have been fighting with this issue for a few weeks now. I have a client who has to send a file to their bank, and the format of the file is very specific.

I created a Crystal report to pull the data out of the database. The header, detail, and summary records all require a specific # of spaces at the end of each line. In the first formula I used, for the header record, I tried using the ReplicateString() function and then tried to use the Space() function.
Exporting to .txt still truncates the spaces.
Then, I found a Crystal hot fix, via this forum, and applied it.
Now, the .txt file does show some spaces, but not the same # of spaces I need.

Here's one I tried with the ReplicateString() function:
'0000000012345' + {TranDate} + '0394888TT' + '01' + ReplicateString(' ',184)

Here's one I tried with the Space() function:
'0000000012345' + {TranDate} + '0394888TT' + '01' +
Space(183) + Chrw(013)

Please help!
Thanks.
Sheila
 
When I export "fixed length record" data I have found that the following works best.

· In the Export window, select format Character-separated values. In the Destination window, select Disk file.
Click OK.

· In the Character-separated Values window, delete the comma in the Separator box, then delete the quotation mark in the Delimiter box.
Click OK.

· In the Number and Date Format Dialog box, leave the check boxes unchecked.
Click OK.

Select your destination folder and file name. The file type will be "chr" for character seperated values.

Hope this works for you.
MrBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top