Skip to main content
A newer version of this page is available. .

Limit the Number of Records per Page

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

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.

    field-list-add-parameter

  • Specify the parameter’s description displayed in Print Preview and set its type to Number (16 bit integer).

    parameter-integer-rows-per-page

  • Drop an XRPageBreak control onto the report’s detail band and switch to the Visual Studio Properties window. 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).

    expressions-page-break-visible

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

    expressions-page-break

    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:

rows-per-page-preview-result