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

Count the Number of Records in a Report or Group

  • 2 minutes to read

This document describes how to display the number or records in a report or group.

Note

You can use this approach to calculating the record count when the UserDesignerOptions.DataBindingMode is set to DataBindingMode.Expressions or DataBindingMode.ExpressionsAdvanced.

See Count the Number of Records in a Report or Group to learn about the legacy approach to calculating the record count with using data bindings.

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

  • Right-click the report’s design surface and add a report header or footer to display the record count for the entire report.

    context-menu-add-report-header

    Tip

    Use a group header/footer for displaying record counts for groups, and a page header/footer for displaying record counts for pages.

  • Switch to the Field List and drop the corresponding data table field onto the created band to create a data-bound label:

    drop-field-report-header

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

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

  • Click the Expression property’s ellipsis button:

    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-count

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

    expressions-format-string-records-count

You can switch to Print Preview to see the resulting report:

expressions-records-count-preview-result