[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

exporting formatted data from crystal 9 to text file

Posted on 2004-11-23
7
Medium Priority
?
282 Views
Last Modified: 2008-01-09
I have Crystal Report 9 and am having difficulty in exporting data the way that I want to a text file.

My data as shown in CR9:

Part            Formatted Field
1234          00000100
1234A        00000100
12345A      00000200

Export to simple text file
What text file shows:

Part           Field
1234          00000100
1234A         00000100
12345A         00000100

You see how the second field is "shifted" over? I want the text file to show exactly what crystal shows. I am not too familiar with the text formatting of CR9. Maybe there is a way to format the first field to be width-specific. I can do this in Access no problem, but we are starting to use CR more and more.

I am sure that this is extremely simple, but I can't to locate the right wording to use the help files.
0
Comment
Question by:mperez1216
  • 3
  • 2
  • 2
7 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 80 total points
ID: 12657100
You need to choose a fixed width font rather than a proportional font.  That should solve most of the problem.

mlmcc
0
 

Author Comment

by:mperez1216
ID: 12657143
How do I know which font is "fixed-width". I've tried Arial and Courier New. Both yield same results.
0
 

Author Comment

by:mperez1216
ID: 12657380
Okay. I've got a riddle for you.

Why, when I open Notepad to display the exported file AND the font is Arial, the columns are not aligned properly THEN I change the font to Courier New and BOOM, everything lines up!?

I know you instructed me to use a fixed-width font in Crystal, but I didn't think that Notepad needs to same font. Also, if I DIDN'T change the font in Notepad and instead open a command prompt to open the file, the columns are aligned properly.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 120 total points
ID: 12657407
To which type of 'text' are you exporting?  CSV, Text, Paginated Text?  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
    1)  Eliminate all special formatting (bolds, underlines, etc...), since they won't export to text.
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.

~Kurt
0
 

Author Comment

by:mperez1216
ID: 12657971
I accepted both answers as far as the selected font and I understood the steps 1-2 from rhinok. Have to look into use 'Fit Section', though. Additional question, to export using 12 CPI, do I change the font size on the Crystal Report? I don't seem to locate any other reference as far as CPI except that which you see on the report.
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 12660225
When you export to text or paginated text, you should see an option to specify characters per inch.  If you don't, then you may need to add or change  registry settings:

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
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12660442
Glad i could help

mlmcc
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question