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

CR 10 pipe delimited txt output 2

Status
Not open for further replies.

JC442

MIS
Apr 19, 2004
34
US
Im running CR 10 on CE10 and trying to produce a pipe delimited txt file. I do not want to have any quotes or additional spaces in the output.

a sample row would be

prog_id|Date(MM/DD/YYYY)|Comment

for example

1000515|12/01/2007|OVER LIMIT|

Is there a combination of txt output options that work?
So far I can produce a report that looks fine in CR until I try to export it as a .txt.








 
You could include in the detail section a single string formula that returns all of the desired text.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Exporting Crystal Reports to various text formats can always be tricky. I created a sample report that exported to a pipe-delimited format in CR10. Here's what I did to make it export properly:

1) Eliminate all unnecessary headers and footers, including the page headers with the labels. You're going to be exporting to .csv (character-separated values) format, which is intended for data only, not headers.... Typically, you'd import such a file into some other system. The only section you should export is the detail section.

2) Use guidelines to lock the detail section field down. Eliminate all empty space between all fields. Don't worry about making the field 'fit' the data. It's easier if you set the field width to a static value for all fields.

3) Export the report to Separated Values (.csv) format. Select | as the character by which to separate the values and clear the box completely for the delimiter. Do not check the boxes to keep numbers and dates in the same format.

Voila! Your report is now exported to a clean, pipe-delimited file.

If you are concerned about date and number formatting, I would recommend you convert these fields to text datatype with the appropriate formatting prior within the report itself.

~Kurt

 
Thanks to both of you. Actually the report required the data be grouped by ID and sumarized. Following your suggestions I used a combination of both a single text box to hold each row and formulas and formatting to get the final formatting to work.
Crystal had an obsession about adding comma separators and decimal points to the first number in the group and formatting the date as M/D/YYYY, so I used totext with options for no commas or decimals or decimal points. ToText ({prog_ID},0,"",""). The date field could be formated as MM/DD/YYYY. The default options are not always what we want and it would take a supernatural act to have them altered in our shared environment.

Finally the export was set up as plain txt. In the report writer Paginated text with a 0 selcetion worked, but this option was not available in Crystal Enterprise.
Thanks Again!
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top