Grouping Data
This document demonstrates how to group report data. Grouping allows you to split data into groups based on identical values in a field or fields. Note that data grouping can be performed only if a report is bound to a data source.
To group records in a report, do the following.
Create a new report and bind it to a data source. This tutorial starts with the following report.
Next, switch to the Group and Sort Panel, and click Add a Group. In the invoked drop-down list, select a data member across which the report is to be grouped.
After this, the Group Header band is added to the report with the specified data member set as its grouping criterion.
Drop the data field, which is specified as the grouping criterion, from the Field List panel onto the Group Header band. This data field will be displayed as a header for each group.
In addition, you can enable the corresponding Group Footer band by enabling the Show Footer option in the Group and Sort Panel.
Use the Sort Order drop-down list to manage the sorting order of the group's items (ascending or descending) or to disable sorting in grouped data. If multiple groups are created, you can specify the priority for each group by selecting it in the Group and Sort Panel and using the Move Up and Move Down buttons.
Then, you can calculate a total across the group by placing a Label onto the Group Footer band and specifying its Summary properties in the following way.
Note also that value formatting is applied to a summary independently of the general formatting, and has a greater priority.
The report is now ready. Switch to the Print Preview tab and view the result.