You can modify many different properties on reports to change how the report looks and performs. Like form properties, report properties are divided into categories: Format, Data, Event, and Other. To view a report's properties, you first select the report, rather than a section of the report, in one of three ways:
Click the report selector (see Figure 12.12), which is the small gray button at the intersection of the horizontal and vertical rulers.
Select Report from the drop-down list box in the Properties window.
Choose Edit | Select Report.
After you have selected a report, you can view and modify its properties.
To select a report and open the Properties window at the same time, you double-click the report selector. When you select a report, the Properties window appears, showing all the properties associated with the report. A report has 47 properties available on the property sheet (there are additional properties available only from code), broken down into the appropriate categories in the Properties window. Forty of the properties relate to the report's Format, Data, and the properties on the Other tab; the remaining 7 relate to the events that occur when a report is run. The Format and Data properties are covered in the following sections. Hour 17, "Power Report Techniques," covers the properties on the Other tab. Programming books such as Alison Balter's Mastering Access 2003 Desktop Development cover the seven event properties.
A report has the 23 Format properties described in the following sections for changing the report's physical appearance.
The Caption property of a report is the text that appears in the Report window's title bar when the user is previewing the report. You can modify it at runtime to customize it for a particular situation.
The Auto Resize property was introduced with Access 2002. Its setting determines whether a report is resized automatically to display all the data on the report.
You use the Auto Center property, which was introduced with Access 2002, to designate whether you want the Report window to automatically be centered on the screen.
Auto Center property is also new in Access 2002. This property specifies whether a report is centered automatically within the application window whenever it is opened.
The Page Header and Page Footer properties determine on what pages the Page Header and Page Footer sections appear. The options are All Pages, Not with Rpt Hdr, Not with Rpt Ftr, and Not with Rpt Hdr/Ftr. You might not want the page header or page footer to print on the report header or report footer pages, and these properties give you control over where those sections print.
In Access, you can keep a group of data together on the same page by using the Grp Keep Together property. The Per Page setting forces the group of data to remain on the same page, and the Per Column setting forces the group of data to remain within a column. A group of data refers to all the data within a report grouping (for example, all the customers in a city).
The Border Style property was introduced with Access 2002. Like its form counterpart, it is far more powerful than its name implies. The options for the Border Style property are None, Thin, Sizable, and Dialog. If the Border Style property is set to None, the report has no border. If the Border Style property is set to Thin, the border is not resizable; the Size command isn't available in the Control menu. This setting is a good choice for pop-up reports, which remain on top even when other forms or reports are given the focus. Having the Border Style property set to Sizable is standard for most reports. It includes all the standard options in the Control menu. The Dialog setting creates a border that looks like the border created by the Thin setting. The user can't maximize, minimize, or resize a report with the Border Style property set to Dialog. After you set the Border Style property of a report to Dialog, the Maximize, Minimize, and Resize options aren't available in the report's Control menu. Border Style property is new in Access 2002. This setting lets you specify the type of border to be used for the Report window under print preview mode. It also determines whether the Report window is sizable and which border elements are available for the Report window such as the title bar, Close button, the Control menu, and the Minimize and Maximize buttons.
The Control Box property, which was introduced with Access 2002, lets you specify whether the Report window under Print Preview mode has the Control menu available. The user activates the Control menu by clicking the icon in the upper-left corner of a window. The Control menu displays options for manipulating the window: Restore, Move, Size, Minimize, Maximize, and Close.
The Min Max Buttons property, which was introduced with Access 2002, lets you specify whether the Minimize and/or Maximize options should be available from the Control menu for the Report window in Print Preview mode. The settings are None, Min Enabled, Max Enabled, and Both Enabled.
The Close Button property, which was introduced with Access 2002, specifies whether to enable or disable the Close button on the Print Preview window.
The Width property specifies the width of the report sections.
The background of a report can be a picture. The Picture, Picture Type, Picture Size Mode, Picture Alignment, Picture Tiling, and Picture Pages properties determine what picture is used as a background for the report and what attributes are applied to it.
The Grid X and Grid Y properties determine the density of the gridlines in the Report Design window.
The Layout for Print property specifies whether screen or printer fonts are used in the report. If you want to optimize reports for preview, you should set this property to No; if you want to optimize reports for the printer, you should set it to Yes. This option is not very important if you select TrueType fonts because TrueType fonts usually print equally well to the screen and the printer.
The Palette Source property determines the source for a report's selectable colors.
The Orientation property is used to take advantage of language-specific versions of Microsoft Access, such as Arabic. You can set this property to support right-to-left display features for these language-specific editions of Access, provided that the underlying operating system supports that language and is 32-bit (for example, Windows 2000).
The Moveable property determines whether the user can move the Report window around the screen by clicking and dragging the report by its title bar.
A report has five Data properties, described in the following sections, which are used to supply information about the data underlying a report.
The Record Source property specifies the table or query whose data underlies the report. You can modify the record source of a report at runtime. This feature of the Record Source property makes it easy for you to create generic reports that use different record sources in different situations.
The Filter property allows you to open a report with a specific filter set. I usually prefer to base a report on a query rather than apply a filter to it. At some times, however, it's more appropriate to base the report on a query and then apply and remove a filter as required, based on the report's runtime conditions.
The Filter On property determines whether a report filter is applied. If the Filter On property is set to No, the Filter property of the report is ignored.
The Order By property determines how the records in a report are sorted when the report is opened.
The Order By On property determines whether the Order By property of the report is used. If the Order By On property is set to No, the report's Order By property is ignored.