Show / Hide Table of Contents

Count the Number of Groups in a Report

This document describes how to count the number of groups in a report.

Note

Use this approach if expressions are enabled in the Report Designer (the Label's smart tag includes the Expression property).

See the Count the Number of Groups in a Report topic in the Shape Data (Data Bindings) section to learn about an alternative approach.

  1. Switch to the Group and Sort panel and create a new group. Enable the Show Header option to display the Group Header in the report.

  2. Switch to the Field List and drop the group field onto the created Group Header.

  3. Right-click the report's surface and add a Report Footer to the report.

  4. Drop a label onto the Report Footer and click its smart tag. In the invoked Label Tasks window, click the Summary property's ellipsis button.

  5. In the Summary Editor window:

    • Set the Summary running property to the Report value.
    • Set the Summary function property to Count (Distinct).
    • Set the Argument expression property to the field you group the data by.

  1. Back in the Label Tasks window, you can use the Format String property to format the summary's value:

You can see the group count in the report footer when switching to Print Preview.

  • Improve this Doc
Back to top Copyright © 1998-2020 Paragon9, LLC and Developer Express Inc. All rights reserved.