Link to home
Start Free TrialLog in
Avatar of tomtenac
tomtenac

asked on

Crystal Reports - Subreport that Spans Multiple Pages is Truncated by Page Header

I have a crystal reports file and in it I have one page header and two groupings.  One of the groupings has a subreport attached to it.  The subreport is a SQL Server view that calls a huge amount of text.  The text spans over several pages and when the page header is displayed on subsequent pages, the subreport is truncated, because the header over laps the text.  This is very frustrating.  I tried to make the report as simple as possible with only the header and subreport, but the text is invariably truncated.

Thanks,
Tom
Avatar of ladylinet
ladylinet

Put subreport into separate section, and check Can Grow attribute.
 
 Let us know is that solve your problem.

Lady Linet
Avatar of tomtenac

ASKER

ladylinet,

No dice on the seperate section.  I have the 'Can Grow' feature set on the Subreport and the internal note in the Subreport itself.  I tried a seperate header section, seperate group section, and the detail section, all were truncated by the header.  However, when I supress the header, I get the full subreport.

Thanks,

TomTheTenacious
Avatar of Mike McCracken
Try this

Put the subreport in its own section
Add some formulas
In the report header
Name - InitVars
Formula
global booleanvar SuppressHeader := False;

Name - SetSuppressTrue
Formula
global booleanvar SuppressHeader := True;

Name - SetSuppressFalse
Formula
global booleanvar SuppressHeader := False;

Put {@SetSuppressTrue} in the first detail section and the section after the section added for the subreport
Put {@SetSuppressFalse} in the details section with the subreport at the top.  Insert it before the subreport.

ANother way
In the report header
Name - InitVars
Formula
shared booleanvar SuppressHeader := False;

In the subreport add 2 formulas
In the subreport report header

Name - SetSuppressTrue
Formula
shared booleanvar SuppressHeader := True;

In the subreport report footer

Name - SetSuppressTrue
Formula
shared booleanvar SuppressHeader := False;

WIth either method
In the main report
Click FORMAT --> FORMAT SECTION
Select the PAGE HEADER
Click the formula button to the right of SUPPRESS
shared booleanvar SuppressHeader;
SuppressHeader

mlmcc


I think you will have to put subreport in separate section - why not?

Lady Linet
Ok Guys,

Thanks for responding.  

mlmcc,

I tried what you suggested and it was very close.  I used both the first and the second method that you suggested.  When I used the global variable, I had to use whileprintingrecords before each statement.  However, my text is still truncated.  It's completely confusing.  

I'll give an example...

<u>After applying your method</u>
The report is 3 pages long
Header is printed on page 1 and page 2, but not page 3 (just as we thought it would)
subreport prints on all pages, but is still truncated on page three.

<u>After suppressing the header unconditionally</u>
The report is 2 pages long
Header is never printed
subreport is printed in its entirety

<u>Before any changes</u>
The report is 3 pages long
The header is printed on every page
subreport prints on all pages, but is still truncated on page three

Here's some more background information:  the subreport has subreport links and is printed on more than one occasion for individual groupings.
 
Thanks,
Tom
Interesting.  It must have something to do with when the formulas are evaluated relative to where on the page.

mlmcc
Does anyone have any other suggestions?  Is it possible to have subreports on multiple pages, without the header truncating the text?

Thanks,
Tom
I don't know if I suggested this or not (I don't see it)

Try using the suppressioon idea on SUPPRESS Page Header formula button and on the UNDERLAY FOLLOWING SECTIONS formula button.

mlmcc
I forgot to mention to you guys that I'm exporting the crystal document into an adobe file.  And adobe is causing me the grief.  If I use HTML or Crystal, I get the full text.  Adobe truncates for some reason.  Do you know of this issue?

Thanks,
Tom
I have seen the trouble reported but don't know of a fix.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of ladylinet
ladylinet

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial