Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Report basics
 
Happy with reports: (c) BananaStock/PictureQuest
Applies to
Microsoft Office Access 2003
Microsoft Access 2000 and 2002

A report is an effective way to present your information in read-only format, such as a printed document. You can print other Access objects, such as forms and datasheets, but reports give you more control over how information is displayed, and greater flexibility when you present summary information. For example, in a report that shows sales by product, you can display the total for each product and show each total as a percentage of the grand total.

Here, we introduce the many possibilities for presenting data in reports. You'll learn how to create a report by using a report wizard, which creates a report based on information you provide. You'll also learn about other essential report-related tasks, such as previewing and printing reports.

Contents

What are reports?
Why use reports?
How reports work
When to use reports versus forms
Views in the Report window
Types of reports
Using the report wizards
Using Design view
Previewing a report
Printing a report
Saving a report

What are reports?

A report lets you organize and format information to suit your purpose and specifications. You can use Access to design reports that use many different design elements. For example, you can employ text, data, pictures, lines, boxes, graphs, and other elements to create the report you need. The elements that you use and how you arrange them are up to you. Mailing labels, invoices, sales summaries, and phone lists are all examples of the kinds of reports you can produce with Access.

 Note   These reports are based on sample data found in the Northwind Traders sample database that ships with Access.


Examples of reports


Back to top Back to top

Why use reports?

Access provides several ways to get information from your database. You can:

  • Use a query to view all the products that a particular vendor supplies. A query lets you retrieve information from more than one table, and you can specify criteria for Access to match.
  • Use a form to view all the information about a single product at once. A form provides a portal through which you can view and edit the information in your database.
  • Use a PivotTable view or a PivotChart view to summarize quarterly sales by region. A PivotTable view lets you analyze data and see information in different ways by dragging fields to different locations in a spreadsheet-like view. With a PivotChart view, you can view the information in a PivotTable view in the form of a chart.
  • Use a report to organize and print product sales for a presentation or for distribution to others in your organization. Reports give you precise control over the organization and appearance of your information.

Composite of four object types

Callout 1 A query's datasheet lists many records.

Callout 2 This form shows one record at a time.

Callout 3 A pivot form summarizes information for analysis.

Callout 4 A report groups facts about many records for printing or distributing.


You should use a report when:

  • You want to print information that you use regularly.
  • You want to print information for distribution to others.
  • You need precise control over the organization and appearance of your information when printed.
  • You want to group or summarize information for reporting to others.

After you create a report design and save it, you can use it over and over again. The report design stays the same, but you get current data every time you print the report. If your reporting needs change, you can modify the report design or create a new, similar report based on the original. Using Access, you can create reports that:

  • Organize and present data in groups.
  • Print header and footer information at the report, page, and group level.
  • Calculate running totals, group totals, grand totals, and percentages of totals.
  • Include subforms, subreports, and graphs.
  • Present your data in an attractive format with pictures, lines, fonts, graphics, charts, and conditional formatting.

Back to top Back to top

How reports work

The best way to understand how a report works is to look at a printed report and then examine its design. Some information in a printed report can come from an underlying table or query, the source of the report’s data. Other information about a report, such as a title or column heading, is stored as part of the report design.

Sales by Date Shipped report

Callout 1 The report title and column headings are stored in the report design.

Callout 2 Data comes from fields in the underlying table or query.

Callout 3 Totals come from an expression that is stored in the report design.


The following illustration shows the preceding report in Design view, along with its underlying source of data, the Sales by Date Shipped query.

Report in design mode sourced by query

Callout 1 The report is grouped on ShippedDate, a field that comes from the underlying query.

Callout 2 The OrderID, CompanyName and SaleAmount fields also come from the underlying query.


You create the connection between a report and its source of data by using graphical objects called controls (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.). Controls can be text boxes that display names and numbers, frames that display pictures and graphs, labels that display titles, and graphical lines and rectangles that visually organize data and help make the report attractive.


Back to top Back to top

When to use reports versus forms

You might wonder whether to use a form or a report for a particular need. Reports are read-only and intended for previewing or printing. Forms are interactive and let you edit or view the information in your database.

Use a form when you need to:

  • Edit data stored in the database.
  • Enter new data, such as adding a new customer to the Customer table.
  • Use a custom view to enter or edit data, such as a form to enter sales orders that show product line items and order totals.
  • Provide an interactive look at information in the database for people who actually work with the database.

Use a report when you need to:

  • Provide information for distribution to others.
  • Customize precisely the appearance of printed information.
  • Read detailed information drawn from your database.
  • Summarize or group information for further analysis.

Back to top Back to top

Views in the Report window

The Report window in Access has three views — Design view, Layout Preview, and Print Preview. Click the View button View button to change report view to change the view. Each view is useful for different purposes:

  • Design view  Use Design view to change the design of a report or to create a new report from scratch.

    Design view is similar to a workbench on which you arrange a project along with the tools you need. Some of the tools available in Design view include rulers, the Toolbox, and the field list.

    Design view with Toolbox

    Callout 1 The rulers help you line up and size controls.
    Callout 2 The Toolbox contains controls you can use, such as a label, text box, and combo box.
    Callout 3 You can drag fields from the field list.

  • Print preview  Use Print Preview to check the data for the entire report and to see what the report will look like when it is printed.
  • Layout preview  Use Layout Preview to check the font, font size, and general layout of a report. Layout Preview shows only a sample of the report, not the complete rendering available in Print Preview.

Layout preview

Callout 1 You can see only a subset of the pages in Layout Preview.


You can print a report from the Database window or from any view in the Report window. See the following sections for more information about previewing and printing a report:

Previewing a report
Printing a report

Back to top Back to top

Types of reports

You may want to create a number of different types of reports, depending on your needs. For instance, a meeting with a vendor might call for a detailed report, while an analysis prepared for senior management might call for a summary or grouped report. Here are some of the possibilities:

Detailed report

You can create a detailed report that lists data from a table or query, such as the Employees table.

Employees detail report

Employee data is displayed from the underlying table or query.

Grouped report

A grouped report organizes your data into groups, such as by product category or by date. You can calculate totals for each group and a grand total for the entire report, and you can display information in a group header or footer.

Beverages report and grouped report

Callout 1 Records are grouped according to the value at the beginning of the group.

Summary report

A summary report contains totals but does not print the details.

Summary report

Callout 1 A summary report prints totals and grand totals.

Mailing labels report

You can print names and addresses in a style and format that fits your mailing label stock.

Mailing labels report

Multiple-column report

A multiple-column report is used to display information in several columns, such as a telephone listing.

multiple column report

Back to top Back to top

Using the report wizards

Access provides a number of report wizards to help you create reports. The AutoReport Wizard produces a preformatted single-column report, without prompting you for any information. The other report wizards ask questions and then create a report based on your answers. Even after you have a lot of experience creating reports, you'll probably want to use a report wizard to quickly generate a report to use as a starting point. You can then use it as is or modify it to suit your needs.

You can use report wizards to create a variety of reports, including a:

  • Single-column report.
  • Tabular report.
  • Grouped report, with or without totals.
  • Mailing label report.
  • Chart report that displays a graph.

The AutoReport Wizard provides the fastest way to create a report. That's because it generates a report immediately, without prompting you for information. The report is a preformatted single-column report that displays all the fields in the underlying table or query.

To create a report by using the AutoReport Wizard

  1. In the Database window, click Tables or Queries.
  2. Select the table or query on which you want to base the report.
  3. On the Database toolbar, click the arrow next to New Object, and then click AutoReport in the list.

    Access displays the report.

AutoReport command on the New Object menu

—or—

  1. In the Database window, click Reports.
  2. In the Database window, click New.
  3. In the New Report dialog box, click one of the following:

    AutoReport: Columnar  Each field appears on a separate line with a label to its left.

    AutoReport: Tabular  The fields in each record appear on one line, and the labels print once at the top of each page.

  4. Select a table or query for your report.
  5. Click OK.

    Access applies the last autoformat (autoformat: A collection of formats that determines the appearance of the controls and sections in a form or report.) that you used to format the report. If you haven't created a report with a wizard before or haven't used the AutoFormat command on the Format menu, Access uses the standard autoformat.

Using a report wizard is a good way to get a jump start on creating a report. You can use the report as is or refine it to get exactly the report you want.

To create a report by using another report wizard

  1. In the Database window, click Reports.
  2. In the Database window, click New.
  3. In the New Report dialog box, select one of the choices in the list.

    New Report dialog box

  4. Select a table or query for the report, and then click OK.
  5. Follow the directions on the Report Wizard pages. On the last page, click Finish.

    Last page of the Report Wizard

  6. When you preview the report, you see the report as it will appear in print. You can also increase the magnification to zoom in on details.

 Notes 

  • If you want to include fields from multiple tables and queries in your report, don't click Next or Finish after selecting the fields from the first table or query in the Report Wizard. Instead, repeat the steps to select another table or query and click fields that you want to include in the report, until you have selected all the fields you want.

  • If you click one of the AutoReport options, Access uses the autoformat that you last specified, either in the Report Wizard or by using the AutoFormat command on the Format menu in Design view.


Back to top Back to top

Using Design view

Before creating a report, think about the source of the data. If the data comes only from one table, you can base your report on that table. However, if the data comes from more than one table, you must base the report on a query. For details about creating queries, see the topic About designing a query (MDB). You can also create a report that isn't based on a table or query. For example, you might create a cover letter or a report that combines two or more unrelated subreports.

When you create a report, you can get a head start by using a report wizard — see Using the report wizards. If you would rather build a report on your own, you can start a new report in Design view, choose a record source, and place all the text boxes, labels, and other controls on the report yourself.

To create a report by using Design view

  1. In the Database window, click Reports.
  2. In the Database window, click New.
  3. In the New Report dialog box, click Design View in the list.
  4. Select an underlying table or query for your report. (To create a report not based on a query or table, don’t choose an underlying table or query in the list.)
  5. Click OK.

    Access displays the report in Design view and opens the field list for the underlying table or query.

A new report in Design view

 Tip   To quickly create a new report in Design view that is not based on a table or query, in the Database window, click Reports, then click Create report in Design view.


Back to top Back to top

Previewing a report

When you preview a report, you see how it will look when it is printed without actually printing it. For example, you can check the alignment and spacing of columns of data, or see if the report is returning the data you want. When you preview a report, you have two views to choose from:

  • Use Layout Preview to take a quick look at your report and check the font, font size, and general layout. Layout Preview displays all the sections of a report and a few detail records.
  • Use Print Preview to see the entire report exactly as it will be printed.

When you display a report in Layout Preview or Print Preview, you see a close-up view of it.

Print Preview

To preview a sample of a report from Design view

Do one of the following:

  • On the View menu, click Layout Preview.
  • Click the arrow next to the View button on the toolbar, and then click Layout Preview in the list.

    To return to Design view, click Close on the toolbar.

To preview an entire report from Design view

Do one of the following:

  • On the View menu, click Print Preview.
  • Click the arrow next to the View button on the toolbar, and then click Print Preview in the list.

    To return to Design view, click Close on the toolbar.

To preview a report from the Database window

  1. In the Database window, click Report, and then select the report you want to preview.
  2. Do one of the following:
    • In the Database window, click Preview.
    • On the File menu, click Print Preview.

To return to the Database window, click Close on the toolbar.

To navigate to another page in Print Preview

You can use the navigation buttons to view the pages of a report sequentially or to jump to any page in the report.

  1. Open the report in Print Preview.
  2. Do one of the following:
    • Click one of the navigation buttons (lower-left corner of the window).
    • Type a page number in the page number box, and then press ENTER.

To return to the Database window, click Close on the toolbar.

Page navigation

Callout 1 First page navigation button.
Callout 2 Previous page navigation button.
Callout 3 Next page navigation button.
Callout 4 Last page navigation button.
Callout 5 To view a specific page, type a page number in this box.

In Print Preview, you can zoom in to see details or zoom out to see how well data is positioned on the page. With the mouse pointer positioned over the report, click once. To reverse the effect of the zoom, click again.

 Tip   After previewing the report, you can publish the results to Microsoft Office Word 2003 or Microsoft Office Excel 2003 by clicking the arrow next to the OfficeLinks button on the toolbar, and then clicking either Publish It with Microsoft Office Word or Analyze It with Microsoft Office Excel. Additionally, you can send the output to someone as an e-mail message by pointing to Send To on the File menu, and then clicking Mail Recipient (as Attachment).


Back to top Back to top

Printing a report

You can print a report from Print Preview, Layout Preview, Design view, or from the Database window. Before printing, you'll want to double-check page settings, such as margin or page orientation. Access saves the page settings with the report, so you need to set them only once. If your needs change, you can set them again later.

To change the page settings

  1. Open the report in Design view or Print Preview (or select the report in the Database window).
  2. On the File menu, click Page Setup. (If you are in Print Preview, you can also click Setup on the toolbar.)

    Access displays the Page Setup dialog box.

  3. On the Page tab, under Orientation, click an option:
    • Portrait orients the page vertically.
    • Landscape orients the page horizontally.

      You can also change the paper or printer settings from this dialog box.

  4. Click OK.

To print a report directly from Print Preview, click Print on the toolbar, or on the File menu, click Print.

To send a report to a printer

  1. Open the report in any view (or select the report in the Database window).
  2. On the File menu, click Print. (If you are in the Database window, or in Layout Preview or Print Preview, you can also click Print on the toolbar.)

    Access displays the Print dialog box.

  3. Enter your choices for options such as printer, print range, and number of copies.
  4. Click OK.

Back to top Back to top

Saving a report

You can save the design of a report and you can also save the report results:

  • When you save a report design, you save only its layout or structure, not the data it contains. Access saves the design in the current database.
  • When you save the results of a report, you save the entire report — its data and its design — to a file that you can use in another program, such as Microsoft Excel.

To save the design of a report

  1. On the File menu, click Save (or click Save on the toolbar).
  2. If the report is untitled, type a name in the Report Name box, and then click OK.

To save the results of a report for use in another program

  1. On the File menu, click Export.
  2. Enter a file name.
  3. Select a file type in the Save as type list.
  4. Click Export.

Back to top Back to top

advertisement