Limit the Number of Records per Page

media_1449123804215.png

To add a parameter to the report, in the Field List, right-click the Parameters section, and in the invoked menu, choose Add Parameter.

media_1449123852226.png

Select the parameter, and in the Property Grid, set its Description to Rows per Page:, Parameter Type to Int32 and (Name) to rowsNumber.

media_1449123891152.png

From the Toolbox, drop the Page Break control onto the report’s Detail band and place it at the top of the detail table.

media_1449123926785.png

For the created control, set the Visible property to No, and for its Formatting Rules property, click the ellipsis button, to invoke the Formatting Rules Editor.

In this dialog, click the Edit Rule Sheet… button. The Formatting Rule Sheet Editor will appear.

media_1254894490132.png

Now, click the Add button , to create a new formatting rule. Then, set its Visible property to Yes, and for the Condition property, click the ellipsis button, to invoke the Condition Editor.

media_1254894527946.png

In this editor, define the following expression for the rule: ([DataSource.CurrentRowIndex] % [Parameters.rowsNumber] == 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.

media_1449123941784.png

Now, in the invoked Formatting Rule Sheet Editor, click + , to create a new formatting rule.

Set its Visible property to Yes, and click the ellipsis button for its Condition property.

media_1449123962877.png

In the invoked Condition Editor, define a logical expression for the rule, (e.g. ([DataSource.CurrentRowIndex] % [Parameters.rowsNumber] == 0) And ([DataSource.CurrentRowIndex] != 0)).

To save the changes and close the dialog, click OK.

Then, click Close, to quit the Formatting Rule Sheet Editor, as well.

media_1449124041327.png

To save the changes and close the editor, click OK.

media_1254894573757.png