You can add one or more data groups to a report or label and nest groups to a maximum of 74 levels. Group Header and Group Footer bands accompany data groups automatically.
Note: |
---|
Records in the data source must be sorted and ordered according to the order that you want records to appear in each data group. |
Tip: |
---|
Field controls that are used for grouping in the Detail band are usually moved to the Group Header band. |
To add a data group
-
Open the report or label in the appropriate designer.
-
On the Report menu, click Data Grouping.
The Report Properties dialog box opens.
Note: If the _REPORTBUILDER system variable is not set to the default Report Builder or is set to a third-party builder, the Data Grouping dialog box displays or a different dialog box might display. For more information, see _REPORTBUILDER System Variable and Data Grouping Dialog Box. -
In the Report Properties dialog box, click the Data Grouping tab if it is not selected.
-
On the Data Grouping tab, click Add.
A data group expression appears in the Grouping nesting order list.
-
In the Group on box, type the expression you want. To build an expression, click the ellipsis (…) button to open the Expression Builder.
-
In the Group starts on area, select the output settings you want for the data group.
-
To add another data group, click Add and repeat steps 4 through 5 for each data group expression. To remove a data group, click Remove.
Tip: Expressions appear in the Group nesting order list in the order they are added initially. However, you can change the order of the group expressions. To change the expression order, drag the mover button to the left of the expression you want to move to the position you want. -
When you are finished, click OK.
Group Header and Group Footer bands appear for each data group and surround all Detail bands in the layout. Each Group Header and Group Footer band displays the number of the data group and the data group expression. The Group Header and Group Footer bands with the highest number appear closest to the Detail band.
For more information, see Data Grouping Tab, Report Properties Dialog Box (Report Builder) and Expression Builder Dialog Box.