Part I: Access Building Blocks
326
Groups are most often used to combine data that are logically related. The classic example is
grouping all products by product category. A very practical example is choosing to group on
CustomerID so that each customer’s sales history appears as a group on the report. You use the
report’s group headers and footers to display the customer name and any other information spe-
cific to each customer.
The Report Wizard lets you specify as many as four group fields for your report. You use the
Priority buttons to change the grouping order on the report. The order you select for the group
fields is the order of the grouping hierarchy.
Select the Category field as the grouping field and click the > button to specify a grouping based
on category values. Notice that the picture changes to show Category as a grouping field, as shown
in Figure 9.6. Each of the other fields (ProductID, Description, QtyInStock, RetailPrice, and
SalesPrice) selected for the report will appear within the Category groups.
FIGURE 9.6
Specifying the report’s grouping
Grouping field
Defining the group data
After you select the group field(s), click the Grouping Options button at the bottom of the dialog
box to display the Grouping Options dialog box, which enables you to further define how you
want groups displayed on the report.
For example, you can choose to group by only the first character of the grouping field. This means
that all records with the same first character in the grouping field are grouped. If you group a cus-
tomers table on CustomerName, and then specify grouping by the first character of the
CustomerName field, a group header and footer appears for all customers whose name begins with
the same character. This specification groups all customer names beginning with the letter A,
another group for all records with customer name beginning with B, and so on.