cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting fixed length records in a .txt format

Former Member
0 Kudos

Post Author: jnesbitt

CA Forum: Crystal Reports

How can I configure Crystal Report detail records so they can be exported in a fixed legth .txt record format?

Using Crystal Reports 9.2.3.884

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Post Author: SKodidine

CA Forum: Crystal Reports

The totext is to make sure that the batch number is always 7 digits long and without decimals. For this export I needed to havea fixed length of 400 characters on a 8.5X11, so the font size is 2 with 0 for pagination and 53 for cpi.

Former Member
0 Kudos

Post Author: tjp81

CA Forum: Crystal Reports

What is the TOTEXT for?

Also, what exporting options did you use - 0: Do not paginate; 12 characters per inch?

Former Member
0 Kudos

Post Author: SKodidine

CA Forum: Crystal Reports

I have created CR detail records fixed length of 400 and then exported them to text.

This is how I did it, there might be other ways and I even though I created them in CR XI, it should be similar in CR 9.

Let us assume that your fixed length record needs to be 100 bytes long. Create a formula with all the fields concatenated, that you would otherwise display in the details section. Create a second formula that will use the space function to put trailing spaces.

Here is an example for a fixed length record of 400:

Here are my two fields in my record that have been concatenated.

Formula 1: RecordType & totext(BatchNumber,"0000000");

Formula 2: {@Formula1} & space(400 - length({@Formula1}));