Access 2003

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 to print a complete list of contacts in the database: Alphabetical Contact Listing report and Weekly Call Summary report, a call log to recap phone call summaries made between any two dates.

To run the 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 Alphabetical Contact Listing 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-click on the Alphabetical Contact Listing report.

Select Report Under the Reports Object

Running Contact Management reports

To run the 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 Weekly Call Summary 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 the OK button 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 the report 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 you must answer. 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 the OK button 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 so each field is included in the report, or the click the double arrow to move all fields for the report.
  • When finished, click the Next button.

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) in the right side of the picture. You do not have to select any grouping levels.

Report Wizard

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

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 finished or to bypass this screen, click the Next button.

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: Portrait or Landscape.
  • Select or deselect the Adjust the field width so all fields fit on a page field (this is optional).
  • Click the Next button 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—to display a picture of each report format on the left side of the wizard screen. Highlight the desired format you would like to use.
  • Click the Next button 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 the Finish button 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 on 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 into 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 Officelinks 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 the Close button to close your report and return to the database window.

Printing a report

Any report in the Contact Management database can be outputted 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 , or Zoom sections of the Print dialog box.

    Print Dialog Box
  • Click OK to print the report.

Challenge!

  • Open the Contact Management database.
  • Open the Contacts table in Datasheet view, 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 the Alphabetical Contact Listing report , then Print the completed report.
  • Run the Weekly Call Summary report , then 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 the "No" button 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.
  • Name the report "Job Search Progress".
  • Print the completed report.