Section 8.3. Formatting a Report

8.3. Formatting a Report

So 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.

Figure 8-14. Click the drop-down arrow (circled) to see all the available AutoFormats. (Or, if you have a really large monitor, the AutoFormat previews appear right in the ribbon.) Each thumbnail preview shows the colors and a bit of the background that the format uses, but you need to apply it before you can really see what it looks like.

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:

  • To apply just part of an AutoFormat, choose Report Layout Tools Formatting AutoFormat AutoFormat AutoFormat Wizard. In the AutoFormat dialog box, choose the AutoFormat you want. Then, click Options to show three check-boxes at the bottom of the dialog box: Font, Color, and Border. Turn off the check-mark next to the types of formatting you don't want to apply, and then click OK.

  • To revert to a plain report with no formatting, choose Report Layout Tools Formatting AutoFormat AutoFormat AutoFormat Wizard to show the AutoFormat dialog box. Then, choose None in the list of AutoFormats, and click OK.

  • If you've applied some fancy formatting to your report, and you want to save it as your own custom AutoFormat, choose Report Layout Tools Formatting AutoFormat AutoFormat AutoFormat Wizard to show the AutoFormat dialog box. Then, click Customize, choose "Create a new AutoFormat," enter a name for your AutoFormat, and click OK. Youll see your AutoFormat appear in the AutoFormats list.

8.3.1. Formatting Columns and Column Headers

AutoFormats 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).

Figure 8-15. The Report Layout Tools Formatting Font section is packed with basic formatting tools.

The Layout Tools Formatting Font section lets you adjust all the following details:

  • The font and font size (11-point Calibri is the easy-on-the-eyes standard)

  • The text alignment (left, right, or center)

  • The text color and background color

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.

Figure 8-16. Here, the ProductName column is singled out for special formatting. Although it looks like only a single value is selected, Access will apply formatting changes to the entire column.

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. Formatting numeric fields

You 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 :

  • General Number gives a basic, no-frills number. Access gives each value the number of decimal digits it needs.

  • Currency makes sure each number has two decimal points and gets the currency symbol that's configured for your computer (based on its geographic locale).

    Large numbers get thousands-separator commas to separate the digits, as in $1,111.99.

  • Euro is similar to Currency, except it shows the currency symbol for the euro.

  • Fixed gives each number the same number of decimal places. (Initially it's two, but you can use the Increase Decimals and Decrease Decimals buttons , shown in Figure 8-15, to change this.) Large numbers don't get commas.

  • Standard is the same as fixed, except large numbers do get the thousands separator comma (as in 1,111.99).

  • Percent assumes each number is a fractional value that represents a percentage, where 1.0 is 100 percent. So if you have the number 48, Access changes this to 4800.00 percent. (You can change the number of decimal places with the Increase Decimals and Decrease Decimals buttons.)

  • Scientific displays each number using scientific notation , so 48 becomes 4.80E+01 (which is a fancy way of saying 4.8 multiplied by 10 1 gives you the number that's stored in the field). Scientific notation is used to show numbers that have vastly different scales with a similar number of digits. You can change the number of decimal places using the Increase Decimals and Decrease Decimals buttons.

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. Alternating row formatting

Here'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. Gridlines

When 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. Borders

Along 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.

Figure 8-17. The commands in the Gridlines section of the ribbon let you apply gridlines in the most common patterns: everywhere, between columns only, between rows only, around the outside of your data, and so on. You can also choose a line style (solid, dotted, dashed, and so on), thickness, and color.

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.

Access 2007 for Starters[c] The Missing Manual
Access 2007 for Starters[c] The Missing Manual
ISBN: 596528337
Year: N/A
Pages: 85 © 2008-2017.
If you may any questions please contact us: