Count the Number of Groups in a Report
This document describes how to count the number of groups in a report.
Warning
Use the approach below if expression bindings are not enabled in the Report Designer (the Designer does not provide the Expressions panel).
See Count the Number of Groups in a Report if expression bindings are enabled in the Report Designer (the Designer provides the Expressions panel).
Insert the Group Header band, select the Group Fields section in the Actions category and add a new group field to group the report's data by the required field.
Switch to the Field List and drop the group field onto the created Group Header.
Drop a label onto the Report Footer, expand the Summary section in the Actions category and set the Running property to Report.
Set the Function property to Count (Distinct) and 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.