## Grouping data

Grouped data is data that is sorted and broken up into meaningful groups. In a customer list, for example, a group might consist of all those customers living in the same Zip Code, or in the same Region. In a sales report, a group might consist of all the orders placed by the same customer, or all of the orders generated by a particular sales representative.

#### Group and sort direction

When data is grouped, four sort and group direction options are available. Direction refers to the order in which the values are displayed.

- Ascending
  Ascending order means smallest to largest (1 to 9, A to Z, False to True). The program sorts the records in ascending order and then begins a new group whenever the value changes.
- Descending
  Descending order means largest to smallest (9 to 1, Z to A, True to False). The program sorts the records in descending order and then begins a new group whenever the value changes.
- Original
  Original order is the order the data was originally saved in the database. The program leaves the records in the order in which they appear in their originating database table, and begins a new group whenever the value changes in the group field you select.
- Specified order
  Specified order is a user-defined order. The program places each record into the custom group you specify, leaving the records in each group in original order or it sorts them in ascending or descending order, depending on your instructions. See Creating custom groups.

###### To group data

1. On the Insert menu, click Group.

   The Insert Group dialog box appears.

2. Select the field you want the data grouped by from the top drop-down list.
3. Select the sort direction from the second drop-down list.
4. Select the `Customize Group Name Field` check box if you want to show a different value in the group header.

   Note: By default, the group header of the report will display the value of the field you are grouping on.

   For example, if you grouped by {Customer.CustomerID}, at each change of a group you will see the corresponding customer ID. If you want to display a different value (customer ID as well as customer name), customize the group name field by choosing an alternate data field, or creating a formula.

1. Click OK.

   If your records within each group are unsorted, you need to sort the records within each group. See Sorting records within groups.

###### Related topics

Grouping data in intervals

Creating group headers

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com