Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 30, 2014 at 09:08 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 30, 2014 at 09:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded