Reports


Return to Table of Contents          Return to previous section

Access Reports are primarily intended to generate paper output, but they can also be used effectively for on-screen display. As with a form, the information appearing in a report may be from either a table or a query. A report can also contain sub-reports which typically display related information from other tables.

Creating a Report

To create a report click on the Reports Button and click the New button. The New Report dialog box displays. Select the table (or view) upon which the form is to be based and click the Report Wizards button. Report Wizards is to reports what Form Wizards is to forms: a series of dialog boxes, very similar to those displayed by Form Wizards, determine what information will appear on the form and how it is sorted.

By way of example a report which contains Branch and Account information will be created. The report is to contain information about each Branch and details of Accounts managed (including information about the Account Owners and Transactions carried out). To do this the designer can either:

· Create a report for the Branch table.

· Embed within that a linked sub-report containing for Accounts within which are embedded linked sub-reports for Transactions and Account-Ownership.

or as in the example below:

· Create a query which joins the Branch and Account tables.

· Embed within that linked sub-reports for Transactions and Account-Ownership.

The report (left) was generated using Report Wizards, specifying the query (above left) as the source table/query, requiring a single-column style, with all fields appearing, and a sort order of Branch Id followed by Account Id

 



In the diagram shown, a Group Header has been created for both Branch Id and Account Id (using the Sorting and Grouping Button on the Toolbar) in order to highlight those fields as they change, and Text Boxes and Labels have been moved into the appropriate Header from the Detail section.


Just as a form can be included as a sub-form in a master form, so a report can be included as a sub-report of a master report.

The illustration (left) shows a report based on the query Account Owner Summary (see Figure 36). It will display the Person (identifying number) and Name of Account Owners.

To embed this report in the master report shown:

· Open the master report in Design View.

· Display Report Objects in the Database Window and drag and drop the relevant icon for the embedded report into the body of the master report.

· Specify the Link Child Fields and Link Master Fields.

Figure 43 Embedding a Sub-Report

In the figure above, the Branch and Account Headers have been filled with black and grey respectively using the Palette to make them stand out, and a sub-report detailing Transactions has been added.

The Print Preview button on the Tool bar can be used to look at the output at any time in the design process. The output from the report above is illustrated below.

Figure 44 Report Output

Expressions and Totals

In the above example Text boxes contain information that comes directly from a table or query - the Control Source property of these controls is a field name. The Control Source can however be:

· An expression (calculation)

· A summary statistic calculated over a group or overall (for example average, count, sum and running sum)

For example, to display the sum of all balances of Accounts for each Branch, the designer could create a Branch Id Group Footer and put in it a Text Box with its Control Source property set to =Sum([Balance]).

Return to Table of Contents          Continue with the next section.




Oregon State University, College of Forestry, Forestry Community, Forestry Search, Network Support
OSU | CoF | Community | Search | Forestry Computing Helpdesk

You may direct comments to Websupport
Disclaimer

Last Updated Wednesday, 16-Jul-1997 10:07:46 PDT