Count the Number of Records in a Report or Group
- 2 minutes to read
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 count the number of records in both a report and each group, use the report created in the following tutorial: Group and Sort a Report's Data.
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.
- Do the same for the label placed in the Report Footer, but set its XRSummary.Running property to Report.