Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula For fixing character lengths when exporting to text file 2

Status
Not open for further replies.

crzycrystlgrl

Technical User
Nov 6, 2004
20
US
Hi
Okay so SCR 9....
I am trying to figure out a way to export a report to a text file which needs to be of a fixed character length for a various # of fields..

I looked at


and tried this solution..and it works...however...even using a 11x17 landscape orientation- I will run out of space on the report.

Does anyone know of a formula to mandate a field length in crystal so it will drop into a text file as a specified number of characters?
Thanks
 
This solution is easier, install the HP designjet 3500 CP (standard windows printer), it will give you about 108 inches in landscape if you select 36x108.

-k
 
I had a client for whom every single report (hundreds) had to be exported to paginated text in order to be accepted by their document archiving solution. Following are steps that my team took in order for the reports to be formatted correctly:

A) Eliminate all margins - they are irrelevent to text exporting
B) Use either Courier or Lucida Console fonts, size 10 (these are fixed width fonts and what you would see in Notepad, depending on your OS)
1) Eliminate all special formatting (bolds, underlines, etc...), since they won't export to text.
2) Your available fonts depend primarily on your printer.
C) Eliminate all unnecessary vertical and horizontal spacing.
1) Since you're now using a fixed-width font, you can size the the actual field to the max width of the field
2) Use formulas to ensure that each field has a consistent width. Example, use a formula to pad a field with extra spaces if it is less than the max number of allowed characters.
3) Use 'Fit Section'
D) When you export the report, export using 12 Char per inch.

If you don't get the option to set the Char per Inch, you may need to create or modify the following registry keys:

HKEY_CURRENT_USER\Software\Crystal Decisions\9.0\Crystal Reports\Export\TextExport\CharPerInch (REG_DWORD with a Hex value of C)

HKEY_CURRENT_USER\Software\Crystal Decisions\9.0\Crystal Reports\Export\TextExport\PromptAgain (REG_DWORD with a Hex value of 1)

~Kurt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top