exporting formatted data from crystal 9 to text file

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.
mperez1216Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
You need to choose a fixed width font rather than a proportional font.  That should solve most of the problem.

mlmcc
0
mperez1216Author Commented:
How do I know which font is "fixed-width". I've tried Arial and Courier New. Both yield same results.
0
mperez1216Author Commented:
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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mperez1216Author Commented:
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
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
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
mlmccCommented:
Glad i could help

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.