Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Use of parameter affects export to Excel Post Reply Post New Topic
Author Message
iSing
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 22
Quote iSing Replybullet Topic: Use of parameter affects export to Excel
     Posted: 15 Aug 2013 at 9:06pm
Hi all
 
Running Crystal XI (11.0.0.2495) & exporting to Excel 2003.
 
Using dynamic SQL query to generate report fields on clients.
 
My report has two detail lines - one which will show more information than the other, depending on the detail required:
A - has 11 fields
B - the same 11 fields plus an extra 4 fields.
 
I have two page headers that match the fields in the detail line:
Page header A - has 11 fields
Page header B - the same 11 fields plus the extra 4 fields.
 
All of the fields & field headings are the same font size & I have used the guidelines to line everything up.  The last field in detail A is as wide as the extra four fields in Detail B (thus the report width is the same). 
 
I have a string parameter to suppress the page header & detail depending on user choice:
1  = High
2 =  Detail
 
I have used the following formula in my page header & detail line.
eg {?Report type}="1"
 
Now for the weird bit.
When I export to Excel, my columns misalign.
I have tried putting the headings as report header (split over a & b) but I get the same problem.
 
If I remove one of the page headers & matching detail line from the report - everything lines up.
If I remove the use of the parameter- everything lines up.
If I use export to Excel (data only) - everything lines up.
 
It really seems to the be use of the parameter.
I'm sure I've done this successfully before - but never with an SQL query generating the fields.
 
Help?
 
 
 
IP IP Logged
iSing
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 22
Quote iSing Replybullet Posted: 18 Aug 2013 at 4:51pm
Solved.
When suppressing using a formula in the section expert, I normally use the 'suppress' checkbox as well (as a visual clue that there is a formula being applied to suppress the section).
 
It's this use of the suppress checkbox that's causing the problem.  If I use a formula to suppress my report headers & detail sections WITHOUT the suppress checkbox, it exports with no problem.
 
If I use the suppress checkbox, it causes the field misalignment. 
 
I in addition I suspect that something has changed on our network, as I haven't had this problem before & all of a sudden Excel is taken a very long time to open.  Fix one thing, find another...
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Aug 2013 at 5:45am
FYI:  I was taught that if I have a formula for suppress ( or any other option that can use a formula), not to use the checkbox.  I never asked why.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum