Home > Sample chapters > Microsoft Office > Access

Create Simple Reports in Microsoft Access 2010

Previewing and Printing Reports

Using Print Preview to preview Access reports is very similar to using this view in other Microsoft Office 2010 programs. If you preview your reports carefully, you won’t have any major surprises when you print them.

When previewing reports, you will want to pay special attention to how the pages break. In a grouped report, you can control whether group headings are allowed to appear at the bottom of a page with no data and whether groups are allowed to break across pages.

You can make changes to the setup of your report pages from the Page Setup contextual tab in Layout view or from the tab displayed when you switch to Print Preview. For example, you can specify the following:

  • Paper size

  • Margins

  • Orientation

  • Number of columns

  • Whether Access should print the report’s structural elements or only its data

You can also click the Page Setup button to display the Page Setup dialog box, where you can change all these settings in one place, as well as make additional refinements.

When you are ready to print, you click the Print button on the Print Preview tab of the ribbon to display the Print dialog box. You can also display the Print page of the Backstage view and then print one copy of the report with the default print settings by clicking the Quick Print button.

In this exercise, you’ll preview a report, and you’ll specify that groups should not break across pages. Then you’ll explore the available page setup and printing options.

  1. In the Navigation pane, right click the Alphabetical List of Products report, and then click Print Preview.

    Only the Print Preview tab appears on the ribbon.

  2. On the page navigation bar at the bottom of the window, click the Next Page button repeatedly to view each page of this report.

    httpatomoreillycomsourcemspimages1744757.png

    Because of the changes you made to the report in the previous exercise, the report is now six pages. Several of the groups start on one page and continue on the next page. For readability, let’s fix this layout problem.

    httpatomoreillycomsourcemspimages1745063.jpg

    The group at the top of this page is a continuation of one that started on the previous page.

  3. Switch to Layout view, and then on the Design tab, in the Grouping & Totals group, click the Group & Sort button.

    httpatomoreillycomsourcemspimages1745065.jpg

    The Group, Sort, And Total pane opens at the bottom of the report page.

    httpatomoreillycomsourcemspimages1745067.jpg

    You can use this pane to quickly add grouping and sorting levels and set related properties.

  4. In the Group, Sort, and Total pane, in the Group on ProductName bar, click More.

    Access displays additional options.

    httpatomoreillycomsourcemspimages1745069.jpg

    These are the current grouping settings.

  5. Click the do not keep group together on one page arrow, and in the list, click keep whole group together on one page. Then close the Group, Sort, and Total pane by clicking the Group & Sort button again.

  6. Switch to Print Preview, and page through the report.

    Now none of the groups is broken across pages. However, the report would look better with wider top, left, and right margins.

  7. On the Print Preview tab, in the Page Layout group, click the Page Setup button.

    httpatomoreillycomsourcemspimages1745071.jpg

    The Page Setup dialog box opens.

    httpatomoreillycomsourcemspimages1745073.png

    The Print Options page of the Page Setup dialog box.

  8. Click the Page tab, and verify that the paper size is Letter.

  9. Return to the Print Options page, and change the Top, Left, and Right margins to 0.75. Then click OK.

  10. Scroll through the report to see the results.

    Although all the data in the report fits on the page, the page number in the footer is set too far to the right and is producing extra pages.

  11. Switch to Layout view, scroll down to the bottom of the report, and then scroll to the right until you can see the page number.

  12. Click the page number control, and move and resize it so that it aligns approximately with the Units In Stock column heading.

  13. Switch to Print Preview, and page through the report.

    The report now fits neatly on seven pages.

  14. If you want, print the report by using the same techniques you would use to print any database object.

  15. Close the report, clicking Yes to save your changes.