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

Orphan Group Header Titles

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
Using Crystal Reports 8.5:

"Keep Group Together" produces (relatively) empty report pages. "Repeat Group Header on Each Page" results in orphan headers on the bottom of report pages.

What is a good method to prevent either blank report pages or orphan group headers?
 
You could do a line-count and begin a new page when a new group is starting near the end.

There is no 'line count' in Crystal. Even the page count is known only at the end of the run. But using variables, you can get the same effect.
In the page header, clear away values from the previous page:
WhilePrintingRecords;
NumberVar LineCount :=0;
Inlcude a 'line count' in each header and detail section; make your own estimate of how many lines that section it is equivalent to
WhilePrintingRecords;
NumberVar LineCount := LineCount + 2;
Check the value of the variable in a Formula field, {@Lines_Done}
WhilePrintingRecords;
NumberVar LineCount;
Check for the Page Before option, so as to move to a new page when there will not be enough room. E.g.
{@Lines_Done} > 50
Or something like
{@Lines_Done} > 50
or
({@Lines_Done} + {@Acc_Count}) > 50
This depends on @Acc_Count being a summary total.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top