cancel
Showing results for 
Search instead for 
Did you mean: 

Export in a Record like format

Former Member
0 Kudos

Hi,

After much pain trying to create a report that mimics a record layout (position and length), the closest I've come so far looks reasonable in Excel export format (my runtime engine has limited options)  But the client would like all the data to be in Excel Col A.

So my approach now appears to be thus (stop me now if Crystal is not going to respect padded spaces):

The 8 fields that I currently have in my detail line will need to go into formulas, which in turn will all need to go into a single text field.  Each of the formulas will need to check the length of the data and pad it with trailing blanks, so that the next filed will be at the correct offset.

Is this a sane approach?  If it is, what will my formulas look like, so that I can square this off all nice and tidy?

Thanks!

Matthew Tallon

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Yes, this is a reasonable approach.  In addition, it should give you the ability to export to a text file in the record format that you're looking for.

Here how you would pad the field, assuming a 50-character limit on the size:

left({MyTable.MyField} + ReplicateString(" ", 50), 50)

If your field isn't a string, you will have to convert it to one using the ToText() function.  Look in the Crystal Help for more information about the various types of formatting that are available with ToText().

-Dell

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you Dell.  The syntax would have killed me.  8^)  This should be golden.

Unfortunately export to txt is not an option in the version we have.