Limit the Number of Records per Page
This document describes how to specify the number of data source records displayed on report pages.
Warning
Use the approach below if expression bindings are not enabled in the Report Designer (the Property Grid does not provide the Expressions tab ).
See Limit the Number of Records per Page if expression bindings are enabled in the Report Designer (the Property Grid provides the Expressions tab).
After you bound your report to data and provided content to the report's Detail band, you can limit the number of records each report page displays. This example demonstrates how to pass the required record count as a parameter value.
Switch to the Field List, right-click the Parameters section and add a new report parameter.
Specify the parameter's description displayed in Print Preview and set its type to Number (Integer).
Drop a Page Break control onto the report's Detail band. Set the control's Visible property to No and click the Formatting Rules property's ellipsis button.
In the invoked Formatting Rules Editor, click the Edit Rule Sheet button.
In the invoked Formatting Rule Sheet Editor, click the plus button to create a new formatting rule. Set the Visible property to Yes and click the Condition property's ellipsis button.
In the invoked Condition Editor, specify the required expression.
For example:
([DataSource.CurrentRowIndex] % ?parameter1 == 0) And ([DataSource.CurrentRowIndex] !=0)
Click OK, to save the changes and close the dialog. Then, click Close to quit the Formatting Rule Sheet Editor.
In the Formatting Rules Editor, you can see the created rule (called formattingRule1), which should be moved to the list of active rules on the right using the arrow buttons in the center of the dialog box.
When switching to Print Preview, you can specify how many rows each report page should display by entering the corresponding parameter value: