on 12-30-2014 8:57 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.