Pages

Friday, November 25, 2011

Supressing the blank page after "New Page After" Group Footer setting

I've worked with Crystal for some time, but there's always been one little thing that sort of bothered me, and I had never took the time to figure out how to deal with it.
If you have a group in your report, and want to start a new page after each grouping, you end up with a blank page at the end of the report.  To get rid of this blank page, all you need to do is to add a simple script to the New Page After property of the group footer:

As you can see, we are on the group footer.  In the selection expert, check the New Page After property and then click it's formula button.  In the formula, you just need to compare the resident PageNumber variable with the TotalPageCount variable.  If they are equal, then you are on the last page and the page will suppress.
Specifically, add the following code:
PageNumber = TotalPageCount
And you should be good to go.  No more blank page at the end of the report!
I hope you find this tip helpful.  Thanks for reading!

No comments:

Post a Comment