Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 9: Presenting Data with Access Reports


363


Currency, or Number data types provide three options:

l Each Value: Includes the same value in the field or expression.

l (^) Interval: Includes values falling within the interval you specify.
l Group Interval: Specifies any interval that is valid for the values in the field or expression
you’re grouping on. The Group Interval has its own options:
l Keep Together: Controls widows and orphans so that you don’t have a header at the
bottom of a page without detail until the next page.
l Whole Group: Prints header detail and group footer on one page.
l (^) With First Detail: Prevents the contents of the group header from printing without
any following data or records on a page.
l (^) No: Does not keep data together.
Sorting data within groups
Sorting enables you to determine the order in which the records are viewed on the report, based
on the values in one or more controls. This order is important when you want to view the data in
your tables in a sequence other than that of your input. For example, new products are added to
tblProducts as they’re needed on an invoice. The physical order of the database reflects the
date and time a product is added. Yet, when you think of the product list, you probably expect it
to be in alphabetical order by Product ID, and you want to sort it by Description of the cost of the
product. By sorting in the report itself, you don’t have to worry about the order of the data.
Although you can sort the data in the table by the primary key or in a query by any field you want,
there are good reasons to do it in the report. This way, if you change the query or table, the report
is still in the correct order.
In the case of the products report, you want to display the records in each category group sorted
by description. Follow these steps to define a sort order based on the Description field within the
Category grouping:



  1. Click the Grouping button in the Design ribbon tab to display the Group, Sort, and Total
    area, if it isn’t already open.


You should see that the Category group already exists in the report.



  1. Click the Add a Sort button in the Group, Sort, and Total area.

  2. Select Description in the Field List.


Notice that Sort Order defaults to Ascending.



  1. Close the Group, Sort, and Total area by clicking the X in the upper-right corner.


The Group, Sort, and Total section should now look like Figure 9.34.

Free download pdf