Part III: More-Advanced Access Techniques
710
On the CD-ROM
All of the examples presented in this chapter can be found in the Chapter20.accdb sample database on this
book’s CD-ROM. Please note that many of the figures in this chapter appear with the report Design view grid
turned off to make the report design details easier to see.
Note
This chapter uses data from the Northwind Traders example database. The Northwind data is ideally suited for
the example report described in this chapter and is a good model for most Access databases. The techniques
described in the following sections should be adaptable to any well-designed database without too much trouble.
Grouping and Sorting Data
To be most useful, the data on a report should be well organized. Grouping data that’s similar can
reduce the amount of data presented, which makes it easier to find specific data. As you’ll see in
this section, the Access Report Builder offers a fair degree of flexibility in this regard.
Grouping data alphabetically
Data is often displayed with too much granularity to be useful. A report displaying every sale made
by every employee arranged in a tabular format can be difficult to read. And, as you saw in the
revised example, anything you do to reduce the overload of tabular reports can make the data
more meaningful.
Sometimes even grouping data doesn’t help much. Have you ever seen a book index where every
major topic appeared in bold with minor topics within the major topic indented below the bold
heading? Some book indexes use boldface for virtually everything (including topics with no subor-
dinate subtopics below them), creating a confusing, hard-to-read page. A much better arrangement
is to group data into alphabetically sorted groups. Dictionaries and encyclopedias use alphabetical
groupings for their data. Imagine how difficult it would be to find a person’s phone number if the
data in a phone book weren’t carefully grouped by the letters of the alphabet and then arranged
into alphabetical order within the group!
The Group, Sort, and Total dialog box (which is opened by clicking the Group & Sort button in
the Grouping & Totals group in the Design tab) controls how data is grouped on Access reports.
Sorting alphabetically arranges the records in alphabetical order based on the first character of the
company name, while grouping by company name creates a separate group for each company.
Clicking on the Add a Group button below the Sorting and Grouping area opens a list from which
you choose a field to use for grouping data on the report. In Figure 20.1, both CompanyName and
OrderDate have been selected, with CompanyName being grouped first and then OrderDate
sorted within the company groups.