Detail Section

Reports consist of controls that provide the labels, field values, lines, page numbers, and more that make up the report. Where and how often those controls appear on the printed report is determined by the section in which the control appears.

Only the Detail section is currently in view. This section is the main body of the report and is usually used to display actual values. Theoretically, you don't need a Detail section to have a report. But as a practical matter, nearly all reports have one.


Double-click the title bar in the field list to select all the fields.


Drag and drop them 1.5 inches from the left and two rows of dots from the top.

There are two sets of boxes for each field. Text boxes are on the right; they contain the actual field names, and they're the controls that display the fields' values. The labels are on the left; they display the captions for each field, as determined by the Caption property in the underlying tables. Notice that the GovtType and HistRule fields use the captions Government Type and Historical Rule, respectively, which are easier for readers to understand.


Click View to see the report in Print Preview.

When viewing the actual report, two views are available: Print Preview and Layout view. Print Preview gives you the entire report; Layout view shows you just a few sample pages. Long reports can require much formatting, so Layout view saves time if all you need is a quick look. This report is short, so you can use Print Preview.

A few things need fixing in the report (well, more than a few, but let's concentrate on essentials). The fields are a little close together. Some of the Country and Government Type values are truncated. Also, numbers are currently aligned right; they'd probably look better aligned left. And it would be nice if the Country field values were bold.


Click View to return to Design view.


All text boxes are currently selected (the selector handles are in view on all four sides of each). To increase spacing between fields, choose Format, Vertical Spacing, Increase. Do it again.

Now you'll widen the text boxes.


With all text boxes currently selected, choose View, Properties.

Note that the property sheet says Multiple Selection, which means that more than one element is selected. The settings you make in this property sheet will apply to all currently selected elements.


On the Format tab, edit the Width to 1.35", which will apply to all selected text boxes. Close the property sheet.


Click anywhere outside the text boxes to deselect them. To left-align the numbers in the report, click the Area text box, press Shift and continue to hold it down, and then click the Population text box. On the Formatting toolbar, click the Align Left button (if you can't find it, take a peek at Figure 10.5).

Figure 10.5. The expression in the Page Footer gives you page numbers on each page.


Click the Country text box and click Bold on the Formatting toolbar.


Click View to see your work.

Your records should look like those in Figure 10.4. If they don't, click View to switch to Design view and compare your work to the Detail section in Figure 10.5. (Ignore the Page Footer, which I discuss next.)

Figure 10.4. The Administration report.


Reports have a lot of different elements; it's easy to choose the wrong one. Keep an eye on the title of the property sheet to make sure you're changing the height of, say, a text box, and not its label, its section, or some other control.

Hands-On Microsoft Access(c) A Practical Guide to Improving Your Access Skills
Hands-On Microsoft Access: A Practical Guide to Improving Your Access Skills
ISBN: 0321245458
EAN: 2147483647
Year: 2005
Pages: 169
Authors: Bob Schneider © 2008-2017.
If you may any questions please contact us: