• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1601
  • Last Modified:

Crystal reports variable page breaks.

Crystal reports 2011 Version RTM

I need to control the use of page breaks in Crystal Reports.  The problem is that the vertical size of a group varies on the amount of data in the group. The group contains multiple sub reports.  On some pages more than one group can be printed on a single page.  If a group cannot be printed on the page it moves to the next page. If a group is large than a page it will print on multiple pages.  The problem occurs when a large group prints on multiple pages, I need the next group to start on a new page.  I do not want all groups to print on a new page.

The print size or line height varies on the report so counting lines is not reasonable.  

How do I accomplish this ?
  • 2
1 Solution
I really can't think of any way to accomplish what you want.

You need to track the pages a group takes and there is no easy way to do that.  I will try a couple of things

Can you upload the report so I don't have to build an artificial report and data to test with?


 Could you save the page number in a variable in the group header, and then do a "New Page After" in the group footer if the page number was not the same as the one in the variable?

 It _seems_ like that would work, but I'm not really sure about the exact order that CR uses when it comes to things like group headers and footers, and starting new pages.  When I've tried to look at things like that in the past, it didn't seem to work in the "obvious" way.

Might work.  I don't know what will work so I plan on trying a couple of ideas to track that it is multiple pages.

ONe thing that will come close is to set the NEW PAGE AFTER in the group footer

fpkeeganAuthor Commented:
This solution of tracking the current page number worked.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now