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

Exporting to a space delimited ASCII file

Status
Not open for further replies.
Dec 18, 2006
69
US
Hi all,

I am currently writing a report that the end result will be a space delimited ASCII. I am writing the report using Crystal 2008. Here's what I'm trying to do - I have 3 columns that I need to export into an ASCII text format.

ID Name City
101 Joe Washington DC
102 Jay Philadelphia
103 Jim New York City
104 Jennifer Boston

The ID is 10 characters long.
The Name is 20 characters long.
The City is 40 characters long.

If any of the information is less that the number of characters required then it needs to be filled by blank spaces.
I am able to do the above just fine in crystal. My problem is when I export this information out. I currently am using the export method TEXT. I used 12 characters per inch and do not paginate set to 0. When I open my text file, my city (or whatever the last column is going to be) is cut off. I don't know why it is cutting off. Any advice is greatly appreciated.

Thanks in advance.

TTL101
 
Hi,
How wide is the layout? I believe even the Text export is controlled by the printer selected for the report so anything over 8" wide may be lost. Select a printer that has a wide format or try setting it to landscape mode and see if it helps.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
The layout itself is 900 character long. But I have not even reached that point yet. These 3 columns still fit in portrait layout of 8.5 X 11.
 
I have several reports that I use to do this with so that the data generated can be imported into another conversion program that requires fixed length data.

export to CSV but when the box comes up asking for delimiter and separator, leave those blank.

Depending on what you will be using the resulting data for you may have one other problem using this method and that is a line feed at the end. For my purposes I open the csv file in word and do a find and replace to get rid of those.



_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
whups ... I looked back at my reports and I left on thing out... I also & the formulas together

ie
//{@formula1}&{@formula2}&{@formula2}

Im sure there is another way to do this but thought I would share what I have done

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
I believe the export to csv and leaving the delimiter and separator blank is the best way to do this. It is no longer cutting off my column...YAY!!! The only thing I need to do is simply change the file extension from .csv to .txt.

Thanks in a million.

TTL101
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top