Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: stop excel export wrapping of subreport data Post Reply Post New Topic
Author Message
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Topic: stop excel export wrapping of subreport data
     Posted: 11 May 2010 at 4:56am
I have a subreport bringing in one field of data, which is last column on right in report
The subreport is the same height & formatting as the fields in the report.

Yet when I export to Excel the subreport wraps to the next line in excel.


To eliminate the subreport size problem, I have tried using a variable from the subreport in details, with subreport placed in GH1, but when I hid GH1 the variable is also hidden.
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 12 May 2010 at 1:14am
Let me pass on to you something Brian told me a long time ago, which has worked like a charm in many reports
<quote>
I have a couple thoughts, but it seems like you guys already tried them? First off, subreports are
always calculated last in a section. So they will always return zero in the section they are printed in.
 No way around that. Now, Dreamcatcher said that he created a second footer section and put the
subreport there. I'm assuming you put the subreport, and ONLY THE SUBREPORT, in Footer Section A?
Always keep the subreport in its own section with nothing else in it. If you put it in section B
then it will be called last and not work for you.
Now, if you did all that and it doesn't work (which is should work, but maybe something else is
going wrong...) then you can put the subreport in the Detail section and suppress it. I wrote
about how to do this in Tutorial 9-6  of my CR Encylopedia book.
1. After making sure that the subreport formula works (and you get tons of blank space), add
it to ITS OWN SECTION (very important) in the main report.
2. Then go into the subreport and set EVERY section to be Suppressed. This disables printing
the sections but the formulas will still be calculated. Test to make sure it is blank.
3. Then on the main report right-click on the subreport and select Format Subreport. Click
on the Subreport tab and click the option Suppress Blank Subreport. This hides the subreport
when every section is suppressed. Save your changes.
4. On the main report, right-click on the gray area to the left of the section that has the
subreport and choose Section Expert. Click the option Suppress Blank Section. Save your changes.
This will keep the subreport from printing, but its calculations are still run.
That should do it! I tested this pretty well prior to writing about it and it works like a charm.</quote>
IP IP Logged
anu009
Newbie
Newbie


Joined: 18 Aug 2010
Online Status: Offline
Posts: 28
Quote anu009 Replybullet Posted: 24 Aug 2010 at 7:57pm
Hi There
 
I am facing the same issue of wrapping the text in different rows.In my case the subreport is inserted in between the columns.
As per yggdrasil , i pulled that subreport in different section of group footer of the main report but then on preview it is not coming in one row.
I have followed all your steps , am not sure what went wrong , Can you help in this.


Edited by anu009 - 24 Aug 2010 at 7:57pm
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