Access Basics:
AutoReport

Title: Jan's Illustrated Computer Literacy 101
Did you want: Working with Databases: Access 2007, 2010, 2013, 2016


A report organizes and groups your data for printing. You have more control over the content, arrangement and look of a report than you do for a datasheet or even a form.

Examples below are from starwars.mdb.


Advantages of a Report

A report is designed for primarily for printing. It has advantages over a form or a datasheet for this purpose:

  • Can precisely manage the layout and look for printing

  • Can include summary information like totals and averages

  • Can group data, for example on year or region or postal code

A well-designed report can be a complex thing. Happily, Access provides some quick methods for getting your report started.

Report

Icon: Mouse click Click the report to see each of its 8 pages


Where you are:
JegsWorks > Lessons > Databases

Before you start...

Project 1: Intro

Project 2: Access Basics Arrow: subtopic open
    InterfaceTo subtopics
    Getting StartedTo subtopics  
    Access Objects Arrow: subtopic open
    Icon: StepTable: Design View
    Icon: StepTable: Datasheet View
    Icon: StepManage a Table
    Icon: StepSort & Filter a Table
    Icon: StepQuery Wizard
    Icon: StepAutoForm
    Icon: StepAutoReport
    Icon: StepData Access Page
        About Printing
    Icon: StepPrint Objects
    RelationshipsTo subtopics
    Summary
    Quiz
    ExercisesTo subtopics

Project 3: Tables & Queries

Project 4: Forms & Reports


Search  
Glossary
  
Appendix



Views

Button: Views - Report (2003)Report View

Report View - labeledSince a report is meant for printing, the Report View is actually a print preview.

The example at the right started as an AutoReport but has been modified. This report can show two records per page.

The number of records that can fit on a page depends on the number of fields in each record and the space needed to show the data. There may be several records on a page or only one. It may even take two pages (or more!) per record. You really want to avoid that!

How many pages in the report? Access does not tell you directly. There are two ways to see how many pages it will take to print the report:

  • Best: Create a control that inserts the number of pages in the page header or page footer, like "Page 1 of 8".
    Access provides a menu command for this in Report Design View:  Insert  |  Page Numbers...  which opens a small dialog where you can choose "Page N of M"
     
  • Navigate to the last page and look at its number in the Navigation bar.
     
    WarningFormatting Delay: Access must format the whole report before it can display the last page. It may take a while. Awkward!
     
    For large reports on older computers or older versions of Access, this process can be worse than "awkward". The whole program can hang when trying to format a large report for printing. You might have to break your report up into smaller sets of records, especially if there is an image with each record.

The Report View shows the Print Preview toolbar, which has many of the same buttons as other Office programs, like Zoom and Setup.
 

Button: Views - Design View (2003) Report Design View

Report Design View - labeledThe Report Design View is very similar to the Form Design View.

The fields for the report are displayed in controls with labels.

The page header  and footer can hold a title or other information that you want to see on each page.

The report header  and footer can hold totals and summaries that you want to see at the beginning or end of all of the records.

The Detail section contains the fields for one record.
 


Quick Reports

Access provides two quick methods for creating a report: AutoReport and the Report Wizard. Using one of these quick methods to get your report started can be a real time-saver. You definitely will want to edit a report created with these methods. They are not particularly efficient in using the space on the page.

AutoReport

Button: New Object - AutoFormOn the toolbar is a button for New Objects. This button is not available unless you have a something open or selected in the Database Window that you can use as the source for a report. If you open the drop list of objects and choose AutoReport, then Access immediately creates a report based on the selected object. 

AutoReport - pages 1 and 2AutoReport creates a simple set of pages with at least one page per record. The fields will be listed in a column going down the page. You will definitely want to edit such a report to save paper.

The illustration shows the first record in an AutoReport. Because there was not enough room at the bottom of the first page, the last field (a photo) is on a second page.

Report By Wizard

The link to the Report Wizard is in the Database Window, in the Reports list. Link: Create report by using wizard

The wizard walks you through a number of choices for your form. You can choose:

  • Source for the data
  • Which fields to show
  • To group data (perhaps by year or region or postal code)
  • To sort on up to 4 fields
  • One of 6 layouts
  • Page orientation
  • One of 6 pre-installed styles plus any custom styles you have created for colors and formatting

This produces a report that may look better than the AutoReport, but it will still need adjustments.

In this lesson we will use the AutoReport. You will work with the Report Wizard later.


Icon Step-by-Step 

Step-by-Step: Create with AutoReport

 Icon Step-by-Step

What you will learn:

to create a report with AutoReport
to navigate pages in a report
to zoom the report preview size
to change a control's properties with Property Dialog
to resize a control


Start with: mytrips.mdb from previous lesson

Create a Report with AutoReport

A simple report is very easy to create with AutoReport. There are a number of things you could do to improve the layout, but for this lesson we mostly will settle for what Access provides. Later you will learn how to change all the characteristics of a report.

  1. AutoFormIf necessary, switch to the Database Window and select Tables.
    The only table is Trips, so it will be selected automatically. This table will be the source of records for the new form.
     
  2. button: New Object - AutoFormOn the menu, click the arrow on the New Objects button and select  AutoReport . (Your button may show a different icon depending on what was used last.)
     
    The screen may blink and you may briefly see a minimized window at the bottom of your Access window while Access creates the report. Then the new report will open automatically to the first page, which shows the first two records. You cannot scroll to see more pages! You must use the navigation buttons at the bottom.

    All fields in the Trips table are here and use the default size for the control

    AutoReport - page 1

    First page of Trips report created with AutoReport

Icon: TroubleRecords out of order or missing:
The report shows the records in the same way that the table does, including any sorting or filtering that you left in place.
Simple Solution:
(for AutoReports)
Close and delete the AutoReport. Open the table in Table Datasheet View, remove any filters, sort in the order that you want, save the table. Recreate your AutoReport.
Advanced Solution:
(for complex or formatted reports that you don't want to recreate)
Open the form in Report Design View. Open the Properties dialog for the form. Remove the entry in the OrderBy property and change OrderByOn to No.


Report View: Navigate Pages

Print Preview shows one page at a time by default. You can use the buttons a the top of the window to show 2 or more pages at a time. You can zoom in or out as you wish.

The Navigation bar and the navigation keys on your keyboard can all help you get around in the preview of your report. You cannot use the scroll bars or mouse wheel to change to pages that are not already in the display.

  1. Use each of the navigation buttons at the bottom of the preview window to navigate through the report's pages. Type in a page number. (There are 4 pages in the report)
    Navigation Bar - labeled
  2. Icon: Keyboard Use the navigation keys to move between pages:
    arrow keys, Home, End, Page Up, Page Down
     
  3. While you are navigating, inspect the fields for each record. Problems appear!
    AutoReport:Diary field is cut off  
    The Diary control is not tall enough to show all of the text. Some of the diary entries have several paragraphs that are not showing!

For the memo type fields you can dig into the Properties to make the controls behave intelligently. So cool! You will fix this shortly.

Also, in Report Design View, you can resize and move the controls for a report just like in the Form Design View. You can experiment with that when you have finished the steps below.


Report View: Zoom

Sometimes you need to see a whole page at a time. Sometimes you need to read the text. Access lets you adjust the size to suit your task using the Zoom box or using the mouse.

  1. Button: Zoom - to fitOn the toolbar, open the Zoom list by clicking the down arrow.
     
  2. Click on  Fit . The window now shows the whole page. The text will be very small! Too small to read.
     
  3. Move your mouse over the image of the page. The mouse pointer changes to the Zoom In shape Pointer: Zoom In (larger text)
     
  4. Click on the page. The size changes. The mouse pointer now has the Zoom Out shape Pointer: Zoom Out (smaller text).
     
    Can you read the text now? That will depend on what Zoom size was used before.
     
  5. In the Zoom box on the toolbar, select 100%. Ah! Readable.
     
  6. Move the mouse pointer back over the page near its top and click several times. The page size alternates between Fit and 100%.

Report Design View: Change Control's Properties

The Diary control is not tall enough to show the longer entries. But some records do not have much text so setting a really tall height would waste space for most records. You do not know how much space a future trip diary might need.

Happily, you can set two of the properties for the control to allow it to shrink and grow as needed. Such a smart idea!

  1. Switch back to Report Design View.
     
  2. Dialog: Properties - Diary controlClick on the Diary control to select it.
     The Properties dialog switches to show the properties for this control.
     
    Icon: TroubleProblem: Properties dialog is not visible
    Solution:
    Click on Button: Properties (2003) the Properties button on the toolbar.
     
  3. Properties dialog: Diary - Can GrowClick in the Can Grow property. A down arrow appears.
     
  4. Click the down arrow to open the list of choices and choose Yes.
     
  5. Repeat for the Can Shrink property.
     
    Nothing seems to change about the control Diary yet. You will have to look at the report itself.
     
  6. Trips AutoReport - page 1 after changing properties of Diary controlSwitch back to Report View and look at the pages. Now you can see all of the text in the Diary entries.
     
    Notice on page 3, the Diary entry for trip #5 is short and there is no wasted space before trip #6 starts. But on page 4, there is only 1 trip (#7) because the Diary text is much longer. There is not enough room on page 4 for all of the controls for the last trip, #8, so there is a 5th page to the report now.
     

Save Report

In Print Preview, there is no Save button, but the File menu has the usual Save and Save As commands.

  1. Dialog: Save As - Trips AutoReportClass diskWhile in Print Preview, from the menu select  File |  Save As....
    The Save As dialog appears.
    (You may not see the As box in your dialog)
     
  2. Type the name Trips AutoReport in the first text box and be sure that the As box shows Report.
     
  3. Database Window showing Reports list with new Trips AutoReportClose the report by clicking Button: Close its Close button.
     
    Your report is saved inside the database file and will show in the Reports list in the Database Window.
     

Report Design View: Resize/Move Controls

  1. Switch back to Report Design View.
     
  2. Experiment. 
    Resize the controls. Move them to different locations. Try to improve the layout of the form.
     
  3. When you are finished experimenting, either save your report with a new name or close without saving.

LessonsWorking with Databases Previous Page Next Page




Teachers: Request permission to use this site with your class
 
Copyright 1997-2012 Jan Smith   <jegs1@jegsworks.com>
All Rights Reserved

Icon: DonwloadIcon: CDWant a local copy with no ads? - Download/CD

Want to help?


~~  1 Cor. 10:31 ...whatever you do, do it all for the glory of God.  ~~


Last updated: 30 Apr 2012