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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 4 to excel extra columns

Status
Not open for further replies.

moki

Programmer
Dec 5, 2000
37
0
0
I am trying to export a Crystal report ver 4.6 to excel but keep ending up with extra columns and shifting header columns.

Is this a version bug? Any help is appreciated.

Thank you,

moki
 
No...it isn't really a bug but rather a quirk of Crystal Exports...It has been a while since I did those exports but I did have a trick to position them properly

let us say we have a simple report like


Current Sales for 2004 Date: 15/05/2004

Jan Feb Mar Apr May

100.00 200.00 300.00 400.00 500.00

and I want it to look reasonable after the export to Excel

I would plan it like this:

1. I would have 9 columns to the Excel report (1 for each
month Plus 1 for each space between the months.

To do this I would have empty (a single blank space [ ]) text fields between each column header and data field...so it would look like this

Jan [ ] Feb [ ] Mar [ ] Apr [ ] May

100.00 [ ] 200.00 [ ] 300.00 [ ] 400.00 [ ] 500.00

now the export will assign 9 columns and the spacing will be correct

2. what about the header


Current Sales for 2004 Date: 15/05/2004


well I want it positioned on the page as best as possible with no extremely large column... so it also must have 9 columns....[ ] = an empty text field

[Current][Sales][for][2004] [ ][ ] [ ] [Date:] {dateField}

3. For the spacer line between the header and data there would be 9 empty text fields


Now this can be ugly in the non-exported version. So I would have 2 reports [ Version 1 Normal Report .. Version 2 Excel Export Report]

It might be possible to have one report with 2 subsections for each section. One subsection for a normal report...one subsection if the report was to be exported. Then I would have a PARAMETER that would allow the user to select which one they wanted

This was the best I could do....I would also put a suppressed Readme formula in the report footer to explain to future developers what all these single spaced text boxes were for.

Designing reports for export to Excel spreadsheets is an art. especially if you were having to do it for company CEO's who didn't want to or couldn't clean up raw exports.




Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
ngolem,

I tried it and I'm still getting extra blank columns but thanks for your input.

moki

 
I agree with SV that writing a separte report for exporting is the best

You don't make it easy to diagnoze your problem.

Simply saying you get extra columns tells us nothing!!

Where are these problems occuring??

I gave you a sample report to illustrate what I did...AND THIS DOES WORK...I do it all the time...YOU have provided nothing...other than the fact you cannot get yours to work.

One final trick in doing this

Follow my suggestions as I gave them in the previous post....and

1. dedicate this report solely to export to Excel
2. Create every field (datafield and single space text box) EXACTLY the same size and line them up perfectly.
3, if there is a spacer line then put in single space text boxes in each column.

The report in Crystal will look terrible but it shud export fine....I have done this many times.

If it doesn't GIVE US SOME DETAIL to work with...

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Can anyone tell me how to modify a crystal report after I have added a field to the dbase for windows file that contains the info for the report
I get a message that file has changed and answer yes to query want to change
Some screen flicker happens but I cannot access the file
I created the report with the original data base file structure
I generate other files using the same structure and copy that file to the filename that I used to create the report
That works fine
However, when I modify the structure I loose the report and have to rebuild the report from scratch.
That takes too much time
I have tried modifying the structure of the report file so it duplicates the newly structured data file.
It wont work for me
Any suggestions
Rud
 
lilwud - this has nothing to do with the thread of these posts....start a new post

Moki - I will add one final tip

When you place your fields on your "dedicated" excel export report....DON'T leave any spaces between the fields as you go across horizonaltaly...all fields the same size...butted up together

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top