This tutorial describes how to calculate the total number of records in a report or a group.
See Count the Number of Records in a Report or Group to learn about the alternative approach to solving this task.
See Data Binding Modes to learn more about the available binding modes.
The following image illustrates the report created in this tutorial:
Do the following to calculate the total number of records in a report or a group:
To display the number of records in the report, add the ReportFooter. To do this, right-click anywhere in the report designer, and in the context menu point to Insert Band, and then click ReportFooter.
Then, add the GroupFooter to display the number of records in each group.
Select the label that resides in the Detail band, hold down CTRL, and drag the label's copy to the Group Footer. It will serve as a summary field.
Similarly, place a copy of this label on the Report Footer.
Select the label in the Group Footer and click its smart tag. In the invoked actions list, set the Summary Running property (XRSummary.Running) to Group to calculate the summary for each group in the report.