Chapter 8. Creating Reports

8. Creating Reports

  • Report Basics

  • Printing, Previewing, and Exporting a Report

  • Formatting a Report

  • Filtering and Sorting a Report

There are many reasons to create a hard copy of your lovingly maintained Access data. With a good printout, you can:

  • Carry your information without lugging your computer around . For example, you can take an inventory list while you go shopping.

  • Show your information to non-Access users . For example, you can hand out product catalogs, order forms, and class lists to other people.

  • Review details outside the office . For example, you can search for mistakes while you're on the commuter train home.

  • Impress your boss . After all, it's difficult to argue with 286 pages of raw data.

In Chapter 3 you learned how to print the raw data that's in a table, straight from the datasheet. This technique is handy, but it provides relatively few features. You don't have the flexibility to deal with large blocks of information, you can't fine-tune the formatting of different fields, and you don't have tools like grouping and summarizing that can make the information easier to understand. As you've probably already guessed, Access provides another printing feature that fills in these gaps. It's called reports , and it allows you to create a fine- tuned blueprint that tells Access exactly how it should prepare your data for the printer.

Reports are specialized database objects, much like tables and queries. As a result, you can prepare as many reports as you need, and keep them on hand indefinitely. Life isn't as easy if you stick to the datasheet alone. For example, if you're using the bobblehead database, you may want to print a list of bobblehead dolls with the doll's name and manufacturer information for your inventory list, and a separate list with prices for your budgeting process. To switch back and forth between these two types of printouts using the datasheet, you have to manually rearrange and hide columns every time . Reports don't suffer from this problem, because each report is saved as a separate database object. So if you want to print your inventory list, you simply run the DollInventory report. If you want the budgeting details, you fire up the Doll-Prices report.

To see one reason why reports are insanely better than ordinary datasheet printouts, compare Figure 8-1 (which shows a datasheet printout) and Figure 8-2 (which puts the same data into a simple report). Notice how the datasheet printout has both wasted space and missing information.

Figure 8-1. Ordinary printouts are notoriously bad at dealing with large amounts of data in a single column. Consider the Description field in this Dolls table. Every record has the same- sized box for its description, which fits three short lines. If the information is larger than the available space (as it is for the Edgar Allan Poe doll), it's chopped off at the end. If the information is smaller (as with the James Joyce doll), you have some wasted white space to look at.

Figure 8-2. In a typical report, you size the column widths, but the height of each row depends on the amount of information in the record. That means each row is just large enough to show all the text in the Description field. Best of all, you don't need to apply any special settings to get this behavior. Reports do it automatically.

Access 2007 for Starters[c] The Missing Manual
Access 2007 for Starters[c] The Missing Manual
ISBN: 596528337
Year: N/A
Pages: 85 © 2008-2017.
If you may any questions please contact us: