Joined: 18 Dec 2006
Location: United States
Online Status: Offline
Posts: 6
Topic: Page breaking with multiple groups Posted: 18 Dec 2006 at 9:04am
Here's something that should be fairly common in reports, yet I can't find a way to do it.
I'm working on a report with subtotals for multiple groups, e.g. Company, Branch, Department, Salesperson. The requestor wants a page break between each Department, but they want the Branch subtotal to appear on the same page as the last Department in that Branch.
If I select New Page After on the Department group footer then the Branch subtotals appear on a separate page-not what is wanted. If I leave it off the Department group footer then I don't get the wanted page breaks between departments.
Either I'm missing something or I need to use a formula to control the page breaks & I can't figure out what it would be.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 18 Dec 2006 at 9:24am
You could have a section that displays the Branch Total at the bottom of each Department grouping. But use a formula to disable it if the Branch of the next group is the same as the current Branch. That way it only displays when the Branch changes (the last department of that Branch). You will also have to display it for the last record in the whole report.
You can use Crystal syntax Next({Customer.Branch}) function to find the next field's Branch value and use OnLastRecord function to test when the last record of the report is printing.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 18 Dec 2006
Location: United States
Online Status: Offline
Posts: 6
Posted: 18 Dec 2006 at 9:50am
Thanks. I got a solution from a co-worker using New Page Before in the group header, but I think this solution will solve some other problems I'm having (like having the Salesman group name in both the group header, so it appears in mid-page when the salesman changes, and also in the page header so it is repeated at the top of the next page when the salesman's detail listings span multiple pages).
I'll play around with the Next function & hopefully remember it for the future.
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