In this example, the number of data rows is passed to the report as a parameter.
Do the following to limit the number of records displayed on a report's pages:
To create a table report in this tutorial, start with a report that is bound to the "Products" table of the sample Northwind database (the nwind.mdb file included in the XtraReports installation). To learn more about binding a report to a data source, see Provide Data to Reports. In this tutorial, we will start with the following report layout.
To add a parameter to the report, right-click the Parameters section in the Field List window, and choose Add Parameter in the invoked context menu.
In the Condition Editor, define the following expression for the rule: ([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.
Next, in the Formatting Rules Editor, you can see the newly 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.
Click OK to close the editor.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.