Getting to Know Microsoft Access, Part 8: Learning about Reports - Customizing Your Report
(Page 3 of 4 )
You can change your report to look almost any way you’d like. The best way to get started customizing a form is to use the Create report in Design view shortcut.
You can add a header or footer to your report by choosing the View | Page Header/Footer menu option. You can add images to your report, calculated fields, OLE objects, hyperlinks, and background pictures, just as you would do in a form design.
You can base a report on a Parameter Query. This allows you to specify the criteria for the report when you run it, just as you would if you ran the query directly. Create a Parameter Query by first creating the Parameter Query, as described in a previous lesson, and then creating the report. Create the report by selecting the query in the Database window and choosing the Insert | Report menu option. Access will immediately prompt you for the parameters. Enter the parameters and preview the report. You can print the specified parameters in the report header by clicking the Text Box control tool and placing a text box control in the report header; then deleting the attached label; and finally, opening the property sheet of the new control and entering an appropriate expression that matches the Parameter Query’s criteria expression.
You can sort and group your report records. Then you can summarize the sorted or grouped information to illustrate trends and make conclusions. You can change the underlying sort order, grouping records by text, number, currency, autonumber, or date/time field types. Each data type allows you to group the records differently. To change the Sort Order property, keep the Order By On property set to "Yes" and change the Order By property in the following ways to suit your needs: type the field name in brackets followed by the abbreviation ASC to sort the records by one field in ascending order; type the field name in brackets followed by DESC to sort the records in descending order.
You can group records as well. For example, you might base a report on a query that only uses records from tables that have values in a shared field. You can then group those records in your report by specific values in that shared field. For example, if grouped by a "year" field you might have certain records in 2002, others in 2003, and others in 2004. When you want to create the grouped report you just choose the View | Sorting and Grouping menu option and select a field to group those records by in the dialog box. Then, select the order in which you want to arrange the groups. Select the group properties in the lower pane, and finally select whether or not to add a group header or footer to the sections. After you add a header or footer you can show the field you’re grouping by in the header by just cutting and pasting a label to the group header. Then, to add a text box control that shows the value for the group, just use the Text Box control tool and enter the appropriate expression in the property sheet for that control. When you’ve done that, select the label and replace the text in the label to fit your needs.
Next: More Ways to Customize Your Reports >>
More Microsoft Access Articles
More By Sage Adams