This document demonstrates how to group a report's data. Note that data grouping can be performed only if a report is bound to a data source.
To group records in a report, follow the instructions below.
-
Create a new, or open an existing data-aware report. For example, in this tutorial, we'll use a report with the following layout.
-
Switch to the Group and Sort Panel, and click Add a Group. In the invoked list, choose a data member across which the report is to be grouped.
Note that grouping across calculated fieldsis supported, as well.
-
After this, a Group Headerband is added to the report, with the specified data member being set as its grouping criterion.
Now, it's only left to drop the corresponding item from the Field Listonto this band, so that it's displayed as a header for each group.
-
In addition, you can enable the corresponding Group Footer band, by checking the Show Footeroption in the Group and Sort Panel.
Then, you can calculate a totalacross the group, by placing a Labelonto this band, and specifying its Summaryproperties in the following way.
Note that format stringsfor summary functions are specified via the special Format Stringproperty.
-
To manage the sorting order of the group's items (ascending or descending), use the Sort Orderdrop-down list.
And, 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 Upand Move Downbuttons.
The report is now ready. Switch to the Preview Tab, and view the result.