Case Example


As this chapter has demonstrated, report creation involves many techniques and methods. This case example exposes you to a few more by making some improvements to rptAdministation.

In the Database window, open rptAdministration in Design view. Choose File, Save As and save the report as rptAdminstrationCS.

Cover Pages

Report headers are commonly used to create cover pages, which tell readers what's in the report, who originated the information, who created the report, the date of the report, and so forth.

The current title of National Governments really doesn't do justice to the material within and certainly could stand some explanation. We could dump it entirely, but let's just add a subtitle below it, along with pertinent data about the report:

1.

Select the National Governments label and click after the letter s.

2.

Press Shift+Enter to move to the next line.

3.

Type Key Political Data and press Shift+Enter.

4.

Type CIA World Factbook. Press Shift+Enter.

5.

Type John Doe. Press Shift+Enter.

6.

Type January 1, 200X. Press Enter.

7.

Press F4 for the label's property sheet. On the Format tab, edit the Font Size to 12. Close the property sheet.

8.

Click View to see the report.

The title itself looks okay, but the data starts right after the last line of the title on the same page. Let's put things right.

NOTE

Because the CIA World Factbook is in the public domain, the data is not copyrighted. Depending on the report and audience, you might need to include copyright notices in your report.


9.

Click View to return to Design view. Right-click the Report Header bar and choose Properties.

10.

On the Format tab, edit the Force New Page property to After Section. This leaves the title by itself on the cover page.

11.

Edit the Height property to 6".

12.

Select the label in the header. Edit Top to 4". Close the property sheet. Figure 10.19 shows the label at the bottom of the report header section.

Figure 10.19. The report header section looks uncommonly long, but the extra space ensures that the report title will be on a separate page.


13.

Click View to see the report.

Much betternow the only extraneous item remaining on the page is the page number at the bottom. You could edit the expression in the control in the page footer so that no page number would print on page 1. But it's a lot easier to simply delete the control and create a new one using the Page Number dialog box.

14.

Click View to return to Design view.

15.

In Page Footer, select the page number control and press delete.

16.

Choose Insert, Page Numbers.

17.

In the Page Number dialog box, select a format of Page N of M, a position of Bottom of Page, and an alignment of Right. Deselect Show Number on First Page. Click OK.

18.

Click View to see that there is no page number on the first page.


Separating Groups

If you don't mind lengthening your report somewhat, you can put the data for each group on separate pages. You use the same Force New Page property, except that the pertinent property sheet is that for the group header.

1.

Click View to return to design view.

2.

Right-click the GovtType Header bar and choose Properties.

3.

Edit the Force New Page property to Before Section.

4.

Click View to see the report. Review the Constitutional Monarchy group.

TIP

The Constitutional Monarchy section extends over a few pages, beginning on or about page 3. But there is only a group title on the first page, not on succeeding pages. You can have the group's name appear again at the top of succeeding pages when the group's records span more than one page.

5.

Click View to return to Design view. The GovtType Header property sheet should still be open.

6.

On the Format tab, edit Repeat Section to Yes.

7.

Click View and scroll through your finished report (see Figure 10.20).

Figure 10.20. This is third and last page that has data about the group Constitutional Monarchy. The next group, Dictatorship, doesn't start until the following page.


8.

You can compare your report with rptAdministrationCS in AsiaChap10.mdb. When you're done, save your work. Close the report and the database.





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

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net