Limit the Number of Records per Page

  • 2 minutes to read

This document describes how to specify the number of data source records displayed on report pages.


You can use this approach to limiting the number of data records per page when the UserDesignerOptions.DataBindingMode is set to DataBindingMode.Expressions or DataBindingMode.ExpressionsAdvanced.

See Limit the Number of Records per Page to learn about the legacy approach to solving this task.

See Data Binding Modes to learn more about available binding modes .

After you bind your report to data and provide 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 in Print Preview..

  • 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 (16 bit integer).


  • Drop an XRPageBreak control onto the report's detail band and switch to the Visual Studio property grid. Switch to its Expressions section and click the Visible property's ellipsis button (you can find it under the BeforePrint event's category if you are using the ExpressionsAdvanced binding mode).


  • This invokes the Expression Editor where you can specify the required expression.


    For example:

    ([DataSource.CurrentRowIndex] % ?parameter1 == 0) And ([DataSource.CurrentRowIndex] !=0)

When switching to Print Preview, you can specify how many rows each report page should display by entering the corresponding parameter value: