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 Property Grid does not provide the Expressions tab ).
See Count the Number of Groups in a Report if expression bindings are enabled in the Report Designer (the Property Grid provides the Expressions tab).
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 the group field onto the Report Footer and invoke its smart tag. Set its Summary Running property to Report.
Set the Summary Func 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.