New to Telerik Reporting? Download free 30-day trial

Remove the Last PageBreak for a Report Group

Environment

Product Progress® Telerik® Reporting

Description

In many reporting scenarios, you would like to have page breaks between report groups. You may easily achieve this, for example, by setting the PageBreak property of the Group Footer section to 'After'. However, the page break will occur also after the last Group Footer. Here we explain how to avoid the last page break.

Suggested Workarounds

You may use Bindings to set the PageBreak property of the Group Header or Footer conditionally. The exact conditional Expression will depend on the data that is grouped.

For example, in the following Expression, we compare the last value in the group with the last value of the entire report data, and if they coincide, the Group Footer PageBreak is set to "None".

=IIF(Last(Fields.value) = Exec("Report1", Last(Fields.value)), "None", "After")

The Expression assumes that the data sorting/filtering is not modified in the group. If there is sorting or additional filtering in the data, you must take this into account in the Expression. The Expression assumes also that the last data values don't repeat among the groups. We use the Exec data function to access the data scope of the Report that is parent for the Report Group.

In this article