Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Export in a Record like format

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

Former Member
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question