Back to Devexpress

Count the Number of Groups in a Report

xtrareports-119476-feature-guide-to-devexpress-reports-shape-report-data-count-elements-and-values-count-the-number-of-groups-in-a-report.md

latest1.2 KB
Original Source

Count the Number of Groups in a Report

  • Feb 18, 2026

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

A report can display the total number of groups after binding your report to data and providing content to the report’s detail band.

  • First, group the report’s data. 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.

  • Switch to the Field List and drop the group field onto the created group header.

  • Right-click the report’s surface and add a report footer to the report.

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

  • In the Summary Editor window:

  • Back in the Label Tasks window, you can use the FormatString property to format the summary’s value:

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