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

Displaying Row Numbers in a Report, Group or Page

This document describes how to show the current row number for each data source value displayed in a report.

Note

You can use this approach to displaying row numbers when the UserDesignerOptions.DataBindingMode is set to DataBindingMode.Expressions or DataBindingMode.ExpressionsAdvanced.

See Displaying Row Numbers in a Report, Group or Page to learn about the legacy approach to solving this task.

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

A label can display row numbers after binding your report to data and specifying a bound data field in the XRLabel‘s Expression property.

  • Click the label’s smart tag and invoke its SummaryRunning drop-down list. Select Report to increment the row numbers throughout the entire report, or select Group or Page to reset the row numbers for every group or page.

    expressions-summary-running-report-label-smart-tag

  • Click the ellipsis button for the Expression property:

    expressions-ellipsis-label-smart-tag

  • This invokes the Summary Expression Editor where you can select the required function in the Functions | Summary section:

    expression-editor-summary-record-number

  • You can use the FormatString property to format the resulting value:

    expressions-label-record-number-format-string

You can switch to the Print Preview to see the record numbers displayed for the specified range:

expressions-record-number-preview-result