Tutorial 3-11. Breaking Reports Apart by Group
As discussed earlier in the chapter, the properties New Page Before and New Page After are used to cause page breaks between groups. This lets you break apart the report and distribute the individual pages. Unfortunately, setting these properties causes a blank page to be printed either at the beginning or at the end of the report. For example, if you choose to enable the New Page Before property for the Group Header, then it always prints a new page before the first group record is printed. This causes a blank page to print as the first page. If instead, you set the New Page After for the Group Footer section then you will get a blank page at the end of the report.
One way to fix this is to have an introductory page in the Report Header or a report summary page in the Report Footer. This ensures that something relevant always prints before the first group or after the last group and you don’t have blank pages appearing. But sometimes, adding these extraneous pages to the beginning or ending of a report isn’t acceptable. You need a way to disable these blank pages from being printed at all. This is done with a simple formula. The formula you use is dependent upon whether you want to use New Page Before or use New Page After. The one you choose doesn’t matter and it’s more of a personal preference. Just make sure you match up the property with the correct formula.
Option 1: Setting New Page Before for the Group Header
- Open the Section Expert and select the Group Header.
- Find the New Page Before property and click on the Formula Workshop button.
- Enter the following formula.
Not OnFirstRecord
This disables the New Page Before property for the first record in the first group and prevents a blank page from printing.
Option 2: Setting New Page After for the Group Footer
- Open the Section Expert and select the Group Footer.
- Find the New Page After property and click on the Formula Workshop button.
- Enter the following formula.
Not OnLastRecord
This disables the New Page After property for the last record in the last group and prevents a blank page from printing.