8.3. Formatting a ReportSo far, you've learned to create simple reports that show all the information you want in a compact table. The only problem with these reports is that they all look the same. If you're working in a cubicle farm for a multinational insurance company, this drab sameness is probably a good thing. But those who still have a pulse may want to jazz up their reports with borders, exotic fonts, and a dash of color . The quickest way to apply formatting is to use one of the prebuilt AutoFormats (shown in Figure 8-14) from the Report Layout Tools Formatting AutoFormat AutoFormat list. Each AutoFormat applies a combination of fonts, colors, and border settings. AutoFormats let you transform the entire look of your report in one step, but they dont give you the fine-grained control to apply exactly the details you want.
Note: Remember, in order to format a report, it needs to be in Layout view. If you double-click a report in the navigation pane, it opens in Report view. Right-click the tab title, and then choose Layout View to switch over. You can do a couple other things with AutoFormat:
8.3.1. Formatting Columns and Column HeadersAutoFormats are a great way to get a bunch of formatting done in a hurry. However, sometimes you want to use more of a personal touch and format the different parts of your report by hand. To apply more targeted formatting, you need to follow a two-step approach. First, select the portion of the report you want to format. Second, click a command in the Report Layout Tools Formatting Font section of the ribbon (Figure 8-15).
The Layout Tools Formatting Font section lets you adjust all the following details:
Although you can format the title, date, or page number sections of the report, you'll spend most of your time formatting the column headers and the column values. To format a column header, click it. To format the column values , click any one of the values in the column. Figure 8-16 shows an example. You can't format the individual values in a column. That means that you can format the ProductName column to look different from the Price column, but you can't format Chocolate Jasmine Tea differently from Prince's Peppermint Patties. This limitation makes senseafter all, you could have thousands of records, and keeping track of the formatting of each one would be way too much work for Access.
Tip: One way around this shortcoming: Use conditional formatting to tell Access when it should kick in some extra formatting based on the value in a cell . See Access 2007: The Missing Manual for full details on this fancy maneuver. 8.3.1.1. Formatting numeric fieldsYou can use the Report Layout Tools Formatting Formatting section of the ribbon to adjust numeric fields (like the Price field in the ProductCatalog report). Youll find a drop-down list that lets you pick various options for formatting numbers :
You can also change the number of digits that are displayed to the right of the decimal point by clicking the Increase Decimals and Decrease Decimals buttons in the Report Layout Tools Formatting Formatting section of the ribbon. 8.3.1.2. Alternating row formattingHere's a simple but powerful formatting trick: Add a shaded background to every second row. Alternating row formatting gives a bit of polish to the plainest report, but it also serves a practical purpose. In dense reports, the shaded bands make it easier for readers to distinguish each row and follow a row from one column to the next. To apply an alternating row format, you need to click immediately to the left of any row. At that point, the entire row becomes selected, and the Report Layout Tools Formatting Font Alternate Fill button is turned on. (The Alternate Fill button looks like a mini-grid. It appears right under the Fill button.) You can click it, and then choose a color. If you click one of the values in the row, the Alternate Fill button won't be turned on, and you won't be able to change the alternating fill color. 8.3.1.3. GridlinesWhen you create a new report, your data is arranged in an invisible table. This table doesn't include any gridlines, so your printouts look sleek and lightweight. But if you're a closet gridline lover, you'll be happy to know you can add borders to the report table. It's up to you whether you want to add them everywhere to keep data carefully regimented in separate cells or just use them judiciously to highlight important columns. Tip: Gridlines are useful with dense reports where the data may otherwise appear to run together into a jumbled mess. Access gurus know that less is more and using just a few gridlines is usually better than adding them between every column and row. You can apply gridlines in two ways. The simplest and most common option is to apply them to the entire table. To do this, click anywhere inside the table of report data, and then choose one of the gridline options from the Report Layout Tools Formatting Gridlines Gridlines list (Figure 8-17). Next, use the other buttons in the Report Layout Tools Formatting Gridlines section to change the thickness , color, and style (dashed, dotted , solid, and so on) of your gridlines. Note: There's one trick to gridlines. You can apply gridlines to the column headings that are different from the ones you use for the rest of the table. To apply gridlines to the column-heading section, just click any column heading, and then choose your gridline options from the ribbon. 8.3.1.4. BordersAlong with report gridlines, you can also use a similar set of border options. The difference between gridlines and borders is that gridlines apply to the table of report data, while borders can be attached to any ingredient in your report.
You'll find the three border buttons (for choosing border thickness, color, and style) in the Report Layout Tools Formatting Controls section of the ribbon. The border options dont make much sense when you use them on column values, because you'll end up with a box around each value. Borders are more useful around other report elements, like the report title. |