Grouping Data

This topic provides a sample that illustrates how to group report data. Grouping allows you to split data into groups based on identical values in a field or fields. Note that grouping can only be applied to bound reports.

To group records in a report, do the following.

  1. Create a new report and bind it to a data source.

  2. Switch to the Properties Panel and add a Group Header band to the report by clicking the corresponding button in the Actions category.

  3. Select the Group Header band and expand the Actions or Behavior category. Then, in the Group Fields section, click the Add button to add a new grouping.

  4. Next, choose a data member across which the report is to be grouped. Note that grouping across calculated fields is supported as well.

    To manage the sorting order of the group's items, use the corresponding arrow button. The and icons indicate the ascending and descending sorting order, respectively. To disable sorting in grouped data, click this button until it is marked with the icon.

  5. Drop the data field, which is specified as the grouping criterion, from the Field List panel onto the Group Header band. Now, this data field will be displayed as a header for each group.

  6. You can also calculate a total across the group by placing a Label onto the Group Footer band, and specify its Summary properties in the following way.

    Note also that value formatting is applied to a summary independently of general formatting and has a greater priority.

The grouping is now applied. Switch your report to the Preview mode and view the result.

See Also