Link to home
Start Free TrialLog in
Avatar of Gareth
GarethFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Ensuring a Crystal Reports group always has its own page

In Crystal Reports IX, I have a report which has two group sections one in the other). In the "inner group", the data is similar to the below:

A  1423

B  1563

B  255

C  677

C  412

C  817

The group is unordered and groups on the first column (A-C). I want to change the report so that group 'B' always has its own page, but the rest of the groups can and should share.

I've tried a number of combinations such as 'new page before/after' and set the formula to be 'onlastrecord', but onlastrecord seems to then split the rows within the group onto different pages (e.g. 1563 on one, 255 on the other). All the combinations I've tried seem to give varied results and there are a surprising number of things to consider too e.g. if B comes out first, don't put a page before it (otherwise it will waste a page, etc). Any ideas?

Avatar of James0628

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


Hi James

Many thanks for this - oddly last time I tried this, it didn't work but I think I know why now. This just about works, but one thing that it does so is that it does the "new page after" after the header detail (so it puts the header on one page, then the detail on another). I've just moved the 'new page after' formula to the group footer and this seems to work perfectly, is this right?
Avatar of James0628

 Yeah, you would use "new page before" in the group header and "new page after" in the group footer (which is what I wrote).  I didn't think to explain any more about using "new page after" in the group footer, instead of the header.  I just took that part for granted.  :-)