The Group and Sort Window

The Group and Sort window offers support for defining grouping (Add a Group) and ordering (Add a Sort) criteria in the report. This window will only be enabled if the report is linked to a data source. When this window is used, the GroupHeader and GroupFooter bands will not need to be added manually as they will be generated automatically. As with the other window from Report Designer, the Group and Sort window can be hidden, resized, or moved around.

Below is a simplified example of how to group report data.

 

1.    Click the Group and Sort window and click Add a Group. In the drop-down menu, select the data field you want to group (data linked to the page being edited will be displayed). In the figures below, the ObjectName field was selected.

 

 

 

If the Show Header option was selected, a GroupHeader band (GroupHeader2 in the example) will be automatically displayed on the page. A GroupFooter band can also be created by marking the Show Footer checkbox.

 

2.    Next, drag and drop the field to be grouped (ObjectName) from the Field List window to the GroupHeader2 band. A Label control will be created and automatically linked to the content of the field in the database. A header for a group of data will then have the same name as an object.

 

 

3.    To include general details that will appear below the header, drag the fields to the Detail tab immediately below GroupHeader2. In the example below, for each object, details on its Compliance Index score will be shown.

 

 

When the report is generated, the name of each analyzed object will be displayed and, below its name, its Compliance Index.

As shown above, the GroupHeader and GroupFooter bands generated through the Group and Sort window are used when you want to group data in the report. These bands can be used to display headers for groupings of data fields, which are generally positioned in Detail bands.

In the example below, the GroupHeader1 band was used to create a header for a table, whose data (displayed on each line of the table) is generated through columns included in various fields in the Detail band located immediately beneath it.

 

 

The Authoritative Document column name is part of the GroupHeader1 band. The fields from this column will be completed automatically with the names of the authoritative documents obtained directly from the database through the [ReferenceDocumentName] column in the Detail band.

Note that immediately beneath the data, the GroupFooter1 band was included to show the totals for the table. This band contains both static data ("Total") and calculated fields obtained through columns, such as [ReferenceModelCounts].

When the report is generated, the table generated by the GroupHeader1, Detail, and GroupFooter1 bands will appear as shown in the figure below.