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

Export to ASCII file.

Status
Not open for further replies.

Appollo14

Technical User
Joined
Sep 4, 2003
Messages
182
Location
GB
Hi all,

I'm having problems exporting V8.01 reports to Ascii format. I've tried exporting directly into a text file and i get extra lines added, i've gone thro word and saved as text and i get extra spaces at the end of the lines and extra linefeeds at the end of the file. I've tried paginated, RTF and other methods but closest that i've got is by exporting to Word, but as i've said it still gives me problems.

The file is going to be imported into a web app and the file structure is very rigid but i just cant seem to get it right.

The report basically has 3 formula's. 1 in header, 1 in detail, 1 in footer.

As an example here is the header formula.
Code:
'$FN:' & totext(count({HSBCnet.CreditAmount}),0,'') & chr(13) & chr(10)
& '$FT:' & totext(sum({HSBCnet.CreditAmount}),2,'') & chr(13) & chr(10)
& '$FC:GBP' & chr(013) & chr(10)
& '$DS' & chr(13) & chr(10)
& 'F01:1122334455' & chr(13) & chr(10)
& 'F02:' & totext({HSBCnet.ValueDate},0,'') & chr(13) & chr(10)
& 'F04:' & totext(COUNT({HSBCnet.CreditAmount}),0) & chr(13) & chr(10)
& 'F05:' & totext(SUM({HSBCnet.CreditAmount}),2,'')
I'm pulling my hair out with this one and would appreciate any advice.

Thanks,
Noel.
 
We had a similar problem with Crystal 10. Wierdly, the trick was to set a high value for Characters Per Inch.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
One alternative is to export to ODBC. This avoids the need to import the text file (assuming the next step in the process is to import into a database table.

Another alternative is to use a UFL to write to a text file.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hi Guys,

Thanks for the responses. I did'nt get around to trying the processes you suggested as i needed a fix in a hurry and we managed to cobble together a process that would parse the resulting text file and strip out the unwanted characters.
However I do appreaciate the response and will add the suggestions to my portfolio of handy tips that will no doubt come in handy in the future.

Once again, many thanks.

Regards,
Noel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top