How to export a long fixed length string in Crystal Reports

Posted By: Wayne Schulz - Contact the author

Not what you're looking for? Check out Schulz Consulting Prior MAS90 News Post Archives or send me an email. Thanks for visiting!


long string crystal export.jpg

Have you ever tried to create a fixed length export file with Crystal Reports? These are typically files you create to send to some third party like a bank. They’ll give you a fixed length record layout and tell you where each field should go and how long it must be.

Everything works well so long as you don’t have a super long length of text.

Well today I had a client that wanted to export a fixed length line of text that was 200 characters long. Crystal Reports wouldn’t export to text without wrapping the line which would have been a problem for the bank to read.

Exporting to a text file via Crystal Reports appears to have a hard limit of a certain size width that’s keyed into how wide the paper is as defined by your printer..

Smaller fonts can combat this to some extent but in my experience not completely.

Some suggestions were to shrink fonts (works to the extent that the fonts can be made small enough) and try different printer drivers that may support larger paper widths (not all drivers support larger paper and it can be a pain to install and maintain a standard printer driver on every machine).

Here’s what ultimately worked for me to export a very wide Crystal Report to text:

Within Crystal Reports 10 – Instead of selecting txt as the export source I selected “record style columns no space” and checked off both “same number style as in report” and “same date formats as in report”

Have not fully tested against the bank yet but appears ok in the WordPad preview.

© 2009, Wayne Schulz. All rights reserved. Limited use is allowed provided you included the following link back to our site “Via: Schulz Consulting Sage MAS90 & MAS200 Consulting”

  • Share/Bookmark

Related posts you might want to review:

  1. Error 88 Sy_ReportEngine.pvc Line xxx [Solved]

Comments

Comments are closed.