Creating a Simple Report in Access 2007

Microsoft Access Add comments

It takes just two steps to create a simple report, and a few more to fine-tune it. If you want to try out this technique for yourself, open the Boutique Fudge database (included with the downloadable content for this chapter, explained in Section 03.3.4) or a database of your creation, and follow these steps:

  1. In the navigation pane, select the table you want to use for your new report.

    This example uses the Products table from the Boutique Fudge database. You can also create a report that’s based on a query. See the box “Doing the Heavy Lifting with a Query” (Section 8.1.2) for more about this trick.

  2. Choose Create Reports Report.

    A new tab appears with a simple, automatically generated report. This report arranges information in a table, with each field in the table (or query) occupying a separate column. The Report view looks somewhat like the datasheet, except for the fact that it has nicer formatting and uses space more efficiently, as shown in Figure 8-2.

    When you first create a report, the fields are arranged from left to right in the same order that they live in the table. It doesn’t make any difference if you’ve rearranged the columns in the datasheet. However, any columns you’ve hidden in the datasheet (Section 3.1.4) are left out of the report.


    Note: You can fine-tune exactly which data appears in your report by removing columns you don’t want and adding new columns. Section 8.1.3 has more about this trick.

  3. Resize the columns smaller or larger until you have the balance you want.

    To resize a column, first click the column header to select it. (A dotted line will appear around the column.) Next, move the mouse to the right-side of the column header, so that it changes into the two-way resize pointer. Finally, drag the column border to the left (to make it smaller) or to the right (to make it larger). Figure 8-3 shows this process in action.


    Figure 8-3. Drag the edge of the column to the desired width. A black box shows you the new width. When you release the mouse button, Access changes the column width and moves all the following columns accordingly. To prevent the last column from leaking off the edge of the page, you may need to shrink some columns after you expand others.


    Note: You’ll see a dotted line on the right side of your report that indicates the edge of the page. You can resize a column right off the edge of the pagewhich may make sense if you have dozens of columns, and the only way you can deal with them is to create a printout that’s two pages wide. Generally, though, it’s better to make sure all your fields fit the width of the page, and turn the page sideways using landscape orientation (Section 3.3.1.1) if you need to accommodate more columns.

  4. Arrange the columns in the order you want by dragging them.

    To move a column, click the column heading, and then drag the column to a new position.


    Tip: You can also move columns with the keyboard. Just click to select the right column, and then use the left and right arrow keys to hop from one spot to the next.

  5. Optionally, you can tweak the formatting by changing fonts, colors, and borders.

    The quickest way to change the formatting of your report is to select the appropriate part (by clicking), and then use the buttons in the Report Layout Tools | Formatting Font section of the ribbon. Using this technique, you can change how titles, column headers, and data appear. Section 8.3.1 has more on this technique.

  6. Add the finishing touches.

    Now’s the time to change the headings, add a logo, and apply page numbers. You’ll learn how to fill in these details starting in Section 8.1.5.

  7. Optionally, choose Office button Print to print the report now.

    You can also adjust the print settings in Print Preview mode (choose Office button Print Print Preview), as described in Section 8.2.

  8. Save your report to use later.

    You can save your report at any time by pressing Ctrl+S. If you close the report tab without saving it, Access prompts you to make the save. Either way, you need to supply a name for your report.

    It’s possible to create reports that have the same names as tables or other database objects. For example, you could create a Products report that shows information about the Products table. However, in practice it’s usually better to pick a more specific report name (like ProductsByCategory, ProductListForDealers, and Top50Products). The report shown in Figure 8-2 and elsewhere in this chapter is named ProductCatalog.

UP TO SPEED
Doing the Heavy Lifting with a Query

The most obvious way to build a report is to base it on an existing table. However, you can also create a report on top of a query. This approach lets you use some heavy-duty filtering or sorting on your records before they reach the report. It also makes sense if you want to create a report that uses information from more than one table.

For example, imagine you decide you want to create a product list that includes additional details from another table (like the category description from the ProductCategories table). Although you can create this report from scratch, it often makes more sense to structure your data with a query first. That way, you can reuse the query for different purposes (like editing), and you can change it any time.

In this example, the first step is to create a query that joins the Categories and Products table (Section 6.3). Then, you save this query, select it in the navigation pane, and choose Create Reports Report to create a report that’s based on the query. You can then follow the normal steps to perfect your report.

Popularity: 4% [?]

Related Post

  • Starting Report Sections at the Top of a Row or Column in Access 2007
  • Creating a Report from Scratch in Windows Vista
  • Preventing Widowed Report Records in Access 2007
  • Inserting the Current Date in a Report in Access 2007
  • Adding Page Breaks after Report Sections in Access 2007
  • Don't Find What You're Looking For? Please Try Here...

    Google
     

    Comments are closed.

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Add to Technorati Favorites Log in