Access XP

Running and Printing Database Reports

Introduction

By the end of this lesson, you should be able to:

  • Run contact management database reports
  • Create a report using AutoReport
  • Create a report using the Report Wizard

Running contact management reports

The contact management database contains two reports you can use: An alphabetical contact listing report to print a complete list of contacts in the database and a weekly call summary report to recap phone call summaries made between any two dates.

To run an alphabetical contact listing report:

  • On the Main Switchboard form, click once on the Preview Reports menu selection.
  • On the reports switchboard, click once on the Preview the Alphabetical Contact Listing Report menu selection.

    Reports Switchboard
  • The report is displayed.

    Alphabetical Contact Listing Report

The contact management reports can also be run in Datasheet view by selecting the Reports tab from the Objects palette of the database window, then double-clicking the Alphabetical Contact Listing report.

Select Report Under the Reports Object

Running contact management reports

To run a weekly call summary report:

  • On the Main Switchboard form, click once on the Preview Reports menu selection.
  • On the reports switchboard, click once on the Preview the Weekly Call Summary Report menu selection.

    Reports Switchboard
  • In the Weekly Call Summary dialog box, type the date range in the Begin Call Date and Ending Call Date fields. This lets you search the database for calls made between two defined dates.

    Define Date Range for Weekly Call Summary Report
  • The report is displayed.

Creating a report using AutoReport

The reports object in Access allows you to create a report to present your data in a meaningful and attractive printout. One way to create a report in Access is to use AutoReport . This report format quickly generates a columnar or tabular report format for records in a selected table.

To create an AutoReport:

  • Open the database window and choose the Reports selection from the Objects palette.

    Reports Object
  • Click the New button to open the New Reports dialog box.

    Reports Toolbar
  • Choose either the AutoReport: Columnar (prints one record in columnar format) or the AutoReport: Tabular options (prints all records in tabular format).

    Columnar Report Sample in Wizard

    Tabular Report Sample in Wizard
  • Click the drop-down list and choose the table or query on which the report or query is based.

    Select Table or Query To Be Used In Report
  • Click OK to create the report and open it in Print Preview . The mouse pointer changes to a magnifying glass . Remember, you cannot edit data in Print Preview.

Columnar report example:

Sample Columnar Report

Tabular report example:

Sample Tabular Report

After you have created a report, you will be asked to save it when you close it or exit Access. When you save a report, only the structure of the report is saved and not the underlying data seen in Print Preview.

Creating a report using the Report Wizard

Another way to create reports in Access is to use the Report Wizard . The Report Wizard asks a series of questions, and Access uses your responses to create the report.

To create a report using the Report Wizard:

  • Open the database window and choose the Reports option from the Objects palette.
  • Click the New button to open the New Reports dialog box.
  • Click the Report Wizard selection.

    Report Wizard
  • Click the drop-down list and choose the table or query on which the report or query is based.

    Select Table/Query To Be Used In Report
  • Click OK to begin the Report Wizard .

Creating a report using the Report Wizard

In the Report Wizard's first dialog box:

Report Wizard

  • Choose the table or query in which you would like to base the report.
  • Highlight the first field from the Available Fields that will be included in the report, and click the right arrow to move the field to the Selected Fields box.
  • Repeat until each field is included in the report, or click the double arrow to move all fields for the report.
  • Click Next .

In the Report Wizard's second dialog box, you can select a field name for grouping purposes. For example, by selecting First Name, notice how First Name becomes the group header (blue text) on the right side of the picture. You do not have to select any grouping levels.

Report Wizard

  • Highlight the field you want to use as a group level, and click the right arrow to move the field to the Selected Fields box.
  • When you're finished or to bypass this screen, click Next .

Creating a report using the Report Wizard

In the Report Wizard's third dialog box, you can specify how or if the reports are to be sorted on the report. For example, if you wanted to show names alphabetically and by state, you would first sort by state and then by last name.

Report Wizard

  • In the first field (optional), select a field name from the drop-down box only if records in the report are to be sorted by that field. Then click the button to define whether records are to be sorted in ascending or descending order.
  • If necessary, repeat for each of the remaining three sort fields.
  • When you're finished or to bypass this screen, click Next .

In the Report Wizard's fourth dialog box:

Report Wizard

  • Select one of the three listed layout options: columnar, tabular, or justified.
  • Select an orientation for the report, either portrait or landscape.
  • If you want, select or deselect the Adjust the field width so all fields fit on a page field.
  • Click Next to continue.

Creating a report using the Report Wizard

In the Report Wizard's fifth dialog box:

Report Wizard

  • Click through the different format options displayed on the screen—Bold, Casual, Compact, etc.—to display a picture of each report format on the left side of the wizard screen. Highlight the desired format you want to use.
  • Click Next to continue.

In the Report Wizard's sixth dialog box:

Report Wizard

  • Assign a name to the report by typing a file name in the What title do you want for your report? field.
  • Click Finish to complete the wizard and generate the report.

Output of Report

You can decide to include any or all of the Report Wizard's selections in your report.

Very Important! When working in tables, forms, queries, and reports, use the New Object button on the toolbar to create new database objects (tables, forms, queries, and reports).

Using Print Preview

When your report opens in Print Preview , it is usually displayed at 100 percent. However, to get a better look at various report features, you may need to resize your window.

Print Preview Toolbar

Viewing a report using the Print Preview toolbar:

  • In Print Preview, your mouse pointer is the zoom tool (magnifying glass), which allows you to zoom in and out. Click the document (or the zoom button on the toolbar) to zoom in for a closer look. Notice Print Preview's drop-down menu reads "100%".
  • Click again on the document (or the zoom button) to fit the document to the Print Preview window.
  • Use the resize drop-down menu to further resize your document .

    Resize drop-down Box
  • Use the display buttons to display one or more pages.

    Display Buttons

    Display Buttons
  • Click the Database window button to bring the database window to the front.
  • Click the Office links button to Publish it with Word or Analyze it with Excel . Clicking either of these choices will allow you to print your document as a Word or Excel document.

    Officelinks OPtions
  • For Help , click the question mark .
  • Click Close to close your report and return to the database window.

Printing a report

Any report in the contact management database can be sent to a printer of your choice.

To print a report from Print Preview:

  • Click the Print button on the Print Preview toolbar to print your document (the Print dialog box will not open).

To print a report using the menu bar or toolbar:

  • Choose File Print from the menu bar to open the Print dialog box.

    Print OPtion Under File Menu
  • Make any necessary changes to the Print Range , Copies , and Zoom sections of the Print dialog box.

    Print Dialog Box
  • Click OK to print the report.

Print Preview and Print are fully explained in our Office 2002 XP tutorial.

Challenge!

  • Open the Contacts table in Datasheet fiew and print all records in the table.
  • Open the Calls table in Datasheet view and print all records in the table.
  • Open the Contact Types table in Datasheet view and print all records in the table.
  • Open the main switchboard form.
  • Run an alphabetical contact listing report and print the completed report.
  • Run a weekly call summary report and print the completed report.
  • Create a report using AutoReport :
    • Create a columnar report against the Calls table.
    • Print the completed report.
    • Close the report and click No in response to the Do you want to save changes to the design of report 'Report1'? system prompt.
  • Create a report using the Report Wizard :
    • Select the Calls table.
    • Select the following fields in the Calls table: Contact ID, Call Date, Subject, and Notes.
    • Do not add any grouping levels.
    • Do not define any sorting.
    • Keep the layout and orientation default settings.
    • Pick a style of your choosing.
    • When prompted to name the report, call it Job Search Progress .
    • Print the completed report.