Fine-tune your report layout in Design view
—by Christine Spencer
Microsoft Access 97/2000/2001
For many database users, the ability to produce customized reports is second only to knowing how to maintain the data. Access has two ways to help you create reports. One way is to use the AutoReport feature, which we detailed in the June 2002 article “Create output in seconds using AutoReports.” If you want a little more control, you might try the Report Wizard that we demonstrated in the September 2002 article “Create custom reports in a flash using the Re-port Wizard.
Both methods quickly produce polished re-ports you can use. But once you see the results, you might want to make some fundamental changes that you can’t do using a wizard. To customize a report, you need to understand the design environment and how to work with con-trols.
Making a few adjustments
In this article, we’ll show you how to adjust the design of a report created with the Report Wi-zard. We’ll start with the report we created in the September 2002 article and modify it. We’ll first examine it in Design view to get our bearings. Then, we’ll change the text of the report title and the width of the text box by using the property sheet. Next, we’ll delete a label and move another control over to change the layout a bit. Then, to make our data easier to read, we’ll center it under the column headings.
Examining a report’s Design view
Open the Northwind sample database. In Access 2002 and 2000, select Reports in the Objects pane. In Access 97, click on the Reports tab. Open the report named Inventory that we created with the Report Wizard in the September 2002 article. The data included in the report comes from two different tables. It’s grouped by category name and then sorted by units in stock.
If you didn’t create the Inventory report, use the steps in the sidebar “Remaking the Inventory report” to build it.
Let’s take a look at how Access constructs this report by examining it in Design view. Click the View button to switch to Design view, as shown in Figure A. The Report Design view window is where you can add your enhancements to reports created with the Report Wizard.
The Report Design view window is divided into various sections that are used to control where report elements appear. The report ele-ments are called controls. These bring data into the report from tables or queries as well as pro-vide labels (static text) such as titles and column headings.
The placement of controls in a particular sec-tion determines how often the data or text in a control will print. For example, information in the Report Header section prints once at the be-ginning of the report. Information in the Page Footer section prints at the bottom of every page. Controls in the Detail section print for every record in the report.