Microsoft Access 2010 Bible

(Rick Simeone) #1

Part I: Access Building Blocks


344


group belong to the indicated category (trucks or motorcycles). Group Header sections immedi-
ately precede Detail sections.

You can have multiple levels of group headers and footers. In this report, for example, the data is
only for categories. However, in some reports you might have groups of information with date val-
ues. You could group your sections by year or by month and year, and within those sections by
another group such as category.

Note
To set group-level properties such as Group On, Group Interval, Keep Together, or something other than the
default, you must first set the Group Header and Group Footer property (or both) to Yes for the selected
field or expression. You learn about these later in the chapter.


The Detail section
The Detail section processes every record in the data and is where each value is printed. The Detail
section frequently contains calculated fields such as profit that is the result of a mathematical
expression. In this example, the Detail section simply displays information from the tblProduct
table except for the last control. The profit is calculated by subtracting the cost from the SalePrice.

Tip
You can tell Access whether you want to display a section in the report by changing the section’s Visible
property in the Report Design window. Turning off the display of the Detail section (or by excluding selected
group sections) displays a summary report with no detail or with only certain groups displayed.


The Group Footer section
You use the Group Footer section to calculate summaries for all the detail records in a group. In
the Products Summary report, the expression = Sum([RetailPrice] - [Cost]) adds a value
calculated from all the records within a category. The value of this text-box control is automatically
reset to 0 every time the group changes.

Cross-Reference
You learn more about expressions and summary text boxes in Chapters 5 and 20.


Tip
You can change the way summaries are calculated by changing the Running Sum property of the text box in
the Report Design window.


The Page Footer section
The Page Footer section usually contains page numbers or control totals. In very large reports,
such as when you have multiple pages of detail records with no summaries, you might want page
Free download pdf