Specifying the grouping columns

StepsTo specify the grouping columns:

  1. In the DataWindow painter, Select Rows>Create Group from the menu bar.

    The Specify Group Columns dialog box displays.

  2. Specify the group columns, as described in “Using the Group presentation style”.

  3. Set the Reset Page Count and New Page on Group Break properties on the General page in the Properties view.

Creating subgroups

After defining your first group, you can define subgroups, which are groups within the group you just defined.

StepsTo define subgroups:

  1. Select Rows>Create Group from the menu bar and specify the column/expression for the subgroup.

  2. Repeat step 1 to define additional subgroups if you want.

    You can specify as many levels of grouping as you need.

How groups are identified

PowerBuilder assigns each group a number (or level) when you create the group. The first group you specify becomes group 1, the primary group. The second group becomes group 2, a subgroup within group 1, and so on.

For example, suppose you define two groups. The first group uses the dept_id column and the second group uses the status column.

The rows are grouped first by department (group 1). Within department, rows are grouped by status (group 2). If you specify page breaks for the groups, a page break will occur when any of these values changes.

You use the group’s number to identify it when defining summary statistics for the group. This is described in “Adding summary statistics”.