Print Page | Close Window

force print 1 detail line on last page

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=534
Printed Date: 29 Apr 2024 at 10:38am


Topic: force print 1 detail line on last page
Posted By: cross
Subject: force print 1 detail line on last page
Date Posted: 17 Apr 2007 at 2:33am
Hi All,

Sometimes my report has detail lines that exactly fill up the first page resulting to the footer being printed on the next page with no detail lines.
Is there a way for me to force my report, in such cases, to print at least one (the last) detail line on the next page so that the page will not look so bare containing only the footer?

ideas anyone?

Thanks!



Replies:
Posted By: hendrang
Date Posted: 12 May 2007 at 11:20pm
This is known as a widowed group footer or orphan group footer. You can prevent this happen by following steps below :

1. Insert a section below the Group Footer to

create Group Footer 1a and Group Footer 1b.

2. Copy all the fields from the Details section into

Group Footer 1a. Group Footer 1a and the Details

section must appear in the same format.

3. Copy the original Group Footer into Group

Footer 1b.

4. From the 'Format' menu, click 'Section'.

5. From the 'Section Expert' dialog box, select

'Group Footer' from the list of sections and select

the 'Keep Together' check box.

6. Select 'Details' from the list of sections and

click the 'X + 2' button beside the 'Suppress'

check box. Keep this check box unselected.

7. In the 'Format Formula Editor' dialog box, type

the following conditional suppression formula:

//This formula conditionally suppresses

//the last record of the Details section.

//Replace {database.field} with the field

//by which you are grouping.

WhilePrintingRecords;

Onlastrecord or {database.field} <>

Next({database.field})

Upon completing these steps, the Details section

will display all the group's records except for the

last record. Group Footer 1a will always display

the last record. If the group extends to the next

page, Group Footer 1a and Group Footer 1b will

always print together.

Therefore, this solution will prevent the

appearance of a widowed group footer.

NB. this procedure is quoted from technicalsupport of businessobjects.com, not from my own.




Posted By: BigC
Date Posted: 26 Jun 2011 at 6:18am
Hi
I've done as suggested in the above post and now my headers are not appearing on the last page
Help!


-------------
BigC



Print Page | Close Window