Skip to main content

Count the Number of Records in a Report or Group

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

  1. 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.

  2. Switch to the Field List and drop the data field onto the header band to create a data-bound label:

    drop-field-report-header

  3. Click the label’s smart tag. In the invoked Label Tasks window, click the Summary field’s ellipsis button.

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

  4. In the Summary Editor window:

    • Set the Running property. 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.
    • Set the Func property to Count.
    • Set the Argument expression editor value to [ProductName].

    expressions-ellipsis-label-smart-tag

  5. Back in the Label Tasks window, you can use the FormatString property to format the resulting value:

    expressions-format-string-records-count

  6. Drop the ProductName field onto the Detail band:

    record-count-report-designer

  7. Switch to the Preview window to see the resulting report:

    expressions-records-count-preview-result