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

Further Text Export Questions

Status
Not open for further replies.

BigDarrin

Technical User
Sep 11, 2002
17
US
Hello,
I'm using Crystal Reports 8.5. I have successfully set up text exports many times in the past and have always and still feel that there is a large degree of "dumb luck" at times in getting these things to work.

Thanks to a great thread on here before about getting a text file to have spaces padded at the end of a line, I have been able to use a formula similar to:
replicatestring(" ",150) + chr(13)

which would preserve all of the extra spacing. Whereas, leaving off the chr(13) would eliminate the padding spaces.

Now, for a different client, this is causing problems. If I include that carriage return, when the client is attempting to import this particular file, he is getting two carriage returns and a linefeed. In looking at the file in V-Edit, I see the programmed carriage return, but then Crystal is automatically adding the CR-LF code, thereby doubling my carriage returns. Aggravatingly, if I replace the formula with:
replicatestring("~",150)
or any other character that isn't a space, it fills in just fine.

Is there some way to force Crystal to include the spaces as if they were actual characters?

Exporting as any other format is not really an option as there is grouping and headers and footers and in my experience RTF, or CSV do not tend to preserve those characteristics.

Please offer any advice that you can!

Thank you,
Darrin
 
Not sure this would work any better, but there is a space function, so you could try:

space(150) + chr(13)

-LB
 
Thanks for the thought lbass, but that function results in the same problem, where if I leave off the carriage return, it leaves the spaces out.

Thanks again.
Darrin
 
Another approach is to build up the text file while the report it processing using a User Function Library.

That method solves the problems with line length, extra carriage returns, and it works across multiple subreports.

Check out the Disk Output UFL from my web site or you can write your own. The SMTP and XML Ufl's do similar things if that destination or fornmat are required.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top