Crystal Reports 2011 - Page Break Formula


Can someone please tell me how to insert a page break formula on change of a field (Products.Category) in Crystal Reports 2011?

When I attempt to insert a page break on Group Footer I then lose my totals and they appear only on the last page.
I need my totals to appear before the page break kicks in.

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you have a group on Products.Category?  If you want a page break after that group footer, it seems like all you'd need is "New Page After" for that footer in the Section Expert.  If that doesn't work, maybe you should provide some more info about your report structure, or post the actual report (.rpt) file, so that we can see the structure for ourselves.

Mike McCrackenSenior ConsultantCommented:

How are the totals calculated?

jspcAuthor Commented:
Yes I have a Group on Products.Category.
New Page After doesn't group them together.
The totals are calculated by in Report Footer via Insert > Summary > Sum.
Attached is the report saved with data.

Thank you.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

OK, as I understand it, you have totals in the report footer, and when you use "new page after" in the group footer, the report footer gets pushed to a separate page, and you don't want that.

 If that's the case, go into the Section Expert for that group footer, uncheck "New page after", click the formula (X+2) button beside "New page after" and enter

not OnLastRecord

 Then the report should go to a new page after that section, except when it's the last record in the report, so you don't get the forced page break before the report footer.

jspcAuthor Commented:
I've tried that but it doesn't work ...
Are you able to try on my rpt file so you can see?
Was I correct about what you're trying to do (page break after the group, except for the last group on the report)?

 I didn't see the saved data in your report, maybe because I'm using an older version of CR.

 Products.Category is actually the 4th group on your report, meaning that the other 3 group footers will come out after that one.  If you're trying to use "new page after" in GF4, you would, of course, need to make sure that you don't use it in the other group footers.

jspcAuthor Commented:
I have a Group set on Products.Category.
I want a page break on change of this.
If using 'not OnLastRecord' on GF4 (Products.Category Group) I don't get what I want. It's not page breaking on change of Products.Category.
When I do use 'not OnLastRecord' then the totals only appear on the last page.
I need the totals to appear on each Product.Group before the break page kicks in.
jspcAuthor Commented:
I think I have worked it out ...
I needed to make Products.Category Group Footer 1. (Re-sort it)
Then I needed to insert new totals (using Insert > Summary > Sum) into this new Group.

Seems to be working now.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Yeah, that sounds more like what you were trying to describe.  I could only assume that your groups were correct and you wanted the totals in the report footer, but it didn't seem to fit some of the things you said.

jspcAuthor Commented:
No reason
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.