. 5
( 14)


¦ Members: Lists team personnel and provides hyperlinks to their e-mail addresses.
¦ Schedule: Posts tasks due this week and next week, and lists project milestones
(important nodal points in the project).
¦ Archive: Includes hyperlinks to documents created by project members, to software
programs, and to other elements of the project.
¦ Search: Includes a search box.
¦ Discussions: Includes links to two threaded discussion groups that are generated by the
Project Web template: the Requirements Discussion and the Knowledge Base.
¦ Contact Information: A page where you can enter your e-mail address.
Part I ¦ Getting Functional with Office 2003

SharePoint Team Web
The SharePoint Team Web site is a ready-to-use, editable intranet site portal that enables
your department, organization, or group to share files and information. SharePoint is
included in Office 2003, and it requires that the SharePoint server files be installed on
your intranet server. For more information on using SharePoint, see Chapter 17 of this

Generating a Web site using the Corporate Presence Web Wizard
In the following tutorial, you will use the Corporate Presence Web Wizard to generate a
Web site.
1. Select File _ New.
2. In the Task Pane, click the Web Site Templates link.
3. In the Web Site Templates dialog box, enter a location and name for your Web in the
“Specify the location of the new web” drop-down list.
4. Double-click the Corporate Presence Web icon in the dialog box.
5. Read the first wizard option box and click Next.
6. In addition to the Home Page option, select the What™s New, Feedback Form, and
Search Form checkboxes. Click Next.
7. From the list of topics that appear on your home page, select all four checkboxes and
click Next.
8. From the list of topics for the What™s New page, select all three checkboxes and click
9. From the list of options for the Feedback Form, select all seven checkboxes and click
10. For the Feedback Form format, select the option labeled “No, use web page format.”
This displays input data in a Web page. Click Next.
11. In the dialog box that asks what should appear on the top and bottom of each page,
choose all the checkboxes except Your Company™s Logo, and click Next.
12. In the Construction Icon options box, select the No radio button to omit the Under
Construction icon from your pages. Click Next.
13. In the dialog box that collects information about your company, fill in the three fields
and click Next.
14. In the dialog box that collects information about your phone numbers and e-mail
addresses, fill in the four fields and click Next.
15. Click the Choose Web Theme button and select the Straight Edge Theme from the
Choose Theme dialog box. Click OK and then click Next.
Chapter 7 ¦ Building FrontPage Web Sites 153

16. In the final dialog box, leave the one checkbox selected to show the Tasks view after
your Web is generated. Click Finish.
17. In Tasks view, right-click the first task, Customize Home Page, and select Start Task
from the context menu.
18. Click and drag to select the comment text, and then replace it with text of your own.
19. Close the page, saving your changes. You are prompted to mark this task as com-
pleted. Click Yes in the dialog box.
20. Return to Tasks view and complete the remaining tasks by replacing comment text
with your own text.
21. Open the Home Page in Page view. Select File _ Preview in Browser to see your Web
site in your browser.
22. Inspect your home page in your browser. Test the link to the Feedback page at the top
of the page.
23. Fill in the fields in the Feedback form.
24. After you fill in the form, click the Submit Feedback button. Then, click the Return to
Form link in the Form Confirmation page.
25. Return to FrontPage and view your site in Folders view. Double-click the _private
folder to view files in that folder. Double-click the file Inforeq.htm to open that
file in Page view. Examine the input that you collected.

Note Input forms work only when your Web is saved to a server with FrontPage extensions.

26. Select File _ Close Web to close your Web after you finish experimenting with it.
You can delete this Web by selecting File _ Open Web, right-clicking the Web, and
then selecting Delete from the context menu.

Creating Basic Web Page Content
After you lay out your Web™s basic structure, you are ready to fill in page content, which
includes text and many other components, such as pictures. Chapter 5 of FrontPage 2003
Bible explores in detail the editing and formatting of text; Chapter 12 of FrontPage Bible
covers the inserting of pictures. Other advanced elements are covered in FrontPage Bible™s
remaining chapters. In fact, for the most part, the rest of this book is about how to place
content on your Web pages.
In addition to text and pictures, FrontPage has many powerful elements, called Web compo-
nents. They range from search boxes to time stamps to hit counters. This section briefly
looks at editing Web page text, and then examines some other basic elements of Web page
content, including breaks, horizontal lines, comments, and bookmarks.
Part I ¦ Getting Functional with Office 2003

Editing Web page text
Entering and editing Web page text is very intuitive: click and type. You™ll find most of the
luxuries of a modern word processor, including red, squiggly underlining of words that are
not found in the dictionary. Other editing help includes the following:
¦ Format Painter: Select text, click the Format Painter tool, and then click new text to
apply the formatting of the original text to the target text.
¦ Thesaurus: Select a word and then choose Tools _ Thesaurus to see a list of syn-
onyms. Find a good one in the Replace with Synonym list and click the Replace button.
¦ Edit, Find, and Edit Replace: Find text strings, with the option of designating
replacement text. The Find and Replace dialog boxes don™t have the option of locating
(or changing) special characters, such as hard line returns, tabs, or paragraphs.
¦ Tab key: Use it (or the spacebar) to insert additional spacing between words.

Inserting breaks
The Break dialog box enables you to insert a forced line break (as opposed to a paragraph
mark). To create a forced line break, select Insert _ Break. The Break dialog box appears,
as shown in Figure 7-10.

Figure 7-10 You can force line breaks with the Break dialog box.

To create a forced line break (within the same paragraph), click the Normal Line Break radio
button and then click OK. Use the Clear Left Margin, Clear Right Margin, or Clear Both
Margins radio button to move the next line past any pictures so that the left, right, or both
sides are cleared to the margin.
To toggle on and off forced line break symbols (nonprinting), click the Show All button in
the Standard toolbar.

An easy way to add a line break is to press Shift+Enter.
Chapter 7 ¦ Building FrontPage Web Sites 155

Adding horizontal lines
Before modern browsers and faster modems were able to interpret and download graphics
quickly, older browsers recognized a graphic element called horizontal lines. New
browsers still interpret these lines, and you can insert them as dividers between text or
graphics. Select Insert _ Horizontal Line to place a horizontal line at your cursor point
(no need to press Enter first).

Default horizontal lines are simply plain, black lines. FrontPage themes, however, provide cus-
tomized lines that match the theme colors.

Placing comments
Comment text is visible in Page view, but doesn™t appear in a browser window. As such, it is
helpful for placing notes to yourself or a collaborator. For example, two Web developers can
use comments to leave each other messages about work that remains on a page.
To insert a comment, follow these steps:
1. Click to place your insertion point where the comment will appear in Page view.
2. Select Insert _ Comment.
3. Type text in the Comment window, as shown in Figure 7-11.

Figure 7-11 Comment text is not visible in a browser ” unless the source HTML
code is examined.

4. Click OK.

Although comment text doesn™t appear in a browser, it does appear if a visitor selects the View
_ Source command in Internet Explorer or the View _ Page Source command in Netscape
Navigator. When the underlying HTML code behind a Web page is displayed, comment text is
surrounded by the code
<!”Webbot bot=“PurpleText” PREVIEW=“xxx” ”>
where xxx is the comment text.
Part I ¦ Getting Functional with Office 2003

Therefore, don™t put anything in comment text that you don™t want the world to read!
You can double-click comment text to edit it. Comment text can be formatted like normal
text, by selecting it and applying formatting attributes such as font color and size. However,
formatting must be applied to an entire comment; you cannot apply separate formatting to
parts of a comment.

Inserting symbols
Symbols include characters such as ã, or ª, that aren™t available in normal keyboard keys.
Most browsers can interpret these symbols.
To insert a symbol, follow these steps:
1. Place your cursor at the insertion point where the symbol will appear.
2. Choose Insert _ Symbol.
3. From the Symbol dialog box, double-click the symbol that you want to insert.
4. Click Close in the Symbol dialog box.

Inserting bookmarks
Bookmarks are locators in a Web page that can be the target of a hyperlink. Bookmarks can
be used for navigation within a page, or as a locator for a link to a page.
To insert a bookmark in a page, follow these steps:
1. Click to place your insertion point on the page, or to select text.
2. Select Insert _ Bookmark from the menu.
3. If you selected text in Step 1, that text appears as the default bookmark name, as shown
in Figure 7-12. If not, the Bookmark Name text box will be empty in the Bookmark
dialog box, and you can enter a bookmark name. To avoid problems with older brows-
ers, it is best to restrict the bookmark name to eight characters or less, with no spaces or
4. Click OK to place the bookmark. If you assigned the bookmark to text, that text
appears in Page view with a dotted line underneath. If you assigned the bookmark to a
blank space on your page, it appears as a small flag.
Chapter 7 ¦ Building FrontPage Web Sites 157

Figure 7-12 Bookmarks serve as targets for links within a page.

You can edit (or clear) bookmarks by right-clicking the bookmark, selecting Bookmark
Properties, and then editing the properties in the Bookmark dialog box.
To create a link to a bookmark, follow these steps:
1. Select text (or a picture) that will be linked to the bookmark.
2. Click the Insert Hyperlinks button. The Hyperlinks dialog box opens.
3. If you are linking to a bookmark on another Web page, enter that page in the URL box.
If you are linking to a bookmark on the open page, you can leave that box blank.
4. From the Bookmark drop-down list, select the bookmark that is the target of your link.
5. The bookmark link target appears in the URL box, with the bookmark preceded by a
pound sign (#).
6. Click OK. You can test your link in the Preview tab either by previewing your page in a
browser or by holding down the Ctrl key and clicking the link in the Normal tab of
Page view.

Using Page Templates
FrontPage 2003 comes with page templates, in addition to the Web templates explored
earlier in this chapter. These page templates are of three types: General, Frames, and Style
Sheets.The options in the General tab of the New dialog box are explored here.
To utilize a page template, follow these steps:
1. Select File _ New.
2. Click Page Templates in the Task Pane.
Part I ¦ Getting Functional with Office 2003

3. The Page Templates dialog box appears. You can preview a page template by clicking
(not double-clicking!) on it and viewing a sample of the page in the Preview area, as
shown in Figure 7-13.

Figure 7-13 You can check out page templates before you generate a new page.

Some page templates are taken from the pages generated by Web templates. These include
the Feedback Form page, the Form Page Wizard (that generates input forms), the Table of
Contents page, and the User Registration page. You were introduced to some of these pages
earlier in the chapter in the section “Using Web Templates and Wizards.”
Other pages include sample graphics and content. Many of these pages are laid out in
columns; these pages use tables.
Use page templates as starting points for your own page content.

Other Views
Up to now, the focus has been on Navigation view and Page view, the two most powerful
views in FrontPage. Navigation view displays and controls Web structure, while Page view
is used to edit individual pages.
Four other choices are available from the Views bar:
¦ Folders view
¦ Reports view
¦ Hyperlinks view
¦ Tasks view
Chapter 7 ¦ Building FrontPage Web Sites 159

All four of these views, described next, complement Navigation view as a way to manage
your entire Web site.

Folders view
Folders view works like Windows Explorer, enabling you to view all of your files in folders.
As in Windows Explorer, you can create a subfolder in your currently selected folder by
choosing File _ New _ Folder.
When a FrontPage Web is generated, some folders are created that hold files that only
“advanced” users are supposed to know about. These folders include the following:
¦ _borders: Holds pages that serve as shared borders.
¦ _fpclass: Holds Java classes. These are files used for objects such as FrontPage-
generated Hover buttons.
¦ _overlay: Holds graphic images used with theme elements.
¦ _themes: Holds files used with themes.
In addition to these generated folders, you can create other folders when you apply advanced
features in FrontPage, or use add-in programs sold by third-party vendors that attach
additional features to FrontPage 2003.
To see these “advanced-level” hidden files, select Tools _ Site Settings, and click the
Advanced tab in the Site Settings dialog box. Select the Show Hidden Files and Folders
checkbox to display hidden files, as shown in Figure 7-14.

Figure 7-14 Hidden files include elements of themes and embedded shared border
Part I ¦ Getting Functional with Office 2003

With hidden files displayed, you can open shared border pages (Left.htm, Right.htm,
Top.htm, or Bottom.htm) and edit them as you would any other page.

Reports view
Reports view provides a list of many useful statistics in your Web site. Additional reports
update you on the status of navigational links, slow pages, and new files. You can select a
report by choosing View _ Reports, and then selecting one of the available reports.
The following list describes each of the reports and how you can use them:
¦ Site Summary: Provides an overview of your site. The rows in the Site Summary view
are themselves links to other views. One of the most useful things about the Site
Summary view is that you can get a quick idea of the size of your Web site, which is
helpful when you look for server space for your site.
¦ All Files: Displays detailed information about each file in your Web site.
¦ Recently Added Files, Recently Changed Files, and Older Files: Display files that
are defined by selecting Tools _ Options and selecting the Reports View tab, as shown
in Figure 7-15. Slow pages are calculated based on the modem speed that you enter in
the Assume connection speed of spin box.

Figure 7-15 You can define which files to display as Recent, Recently Changed,
and Older.

¦ Unlinked Files: Shows files in your Web site to which no links exist. These stranded
Web pages are sometimes called orphan pages.
¦ Slow Pages: Displays a list of files that download too slowly, based on the time you
define in the Report Setting drop-down list in the Reporting toolbar.
Chapter 7 ¦ Building FrontPage Web Sites 161

¦ Broken Hyperlinks: Shows hyperlinks in your Web site that are either invalid or
untested. You can right-click one of these untested hyperlinks and choose Verify from
the context menu to test the link. If the link leads you to an Internet or intranet site, you
must be logged on to the Internet or your intranet to test the link.
¦ Component Errors: Tests FrontPage components for errors.
¦ Review Status and Assigned To: Used for workgroups collaborating on a Web site.
The Review Status report enables you to log pages that must be reviewed, and track
whether pages have been reviewed. The Assigned To report is similar to the Review
Status report, but tracks who is assigned to which page.
¦ Categories: Sorts components of your Web site by type, such as .jpeg images,
.html pages, .gif files, .class Java files, and so on.
¦ Publish Status: Lists which pages have been published to your Web (and which

Hyperlinks view
Hyperlinks view displays all links leading into a Web page from other pages in the site, and
all links out of a selected page. First, choose Hyperlinks view from the Views bar, and then
click a Web page in the Folders list.
Figure 7-16 shows a page in Hyperlinks view with links coming in and going out.

Figure 7-16 Viewing hyperlinks
Part I ¦ Getting Functional with Office 2003

Tip If you are trying to track and test every hyperlink in a page or on your Web site, using the Broken
Hyperlinks report discussed in the previous section of this chapter is much more efficient than
looking for broken links in Hyperlinks view. Use this view only if you need to examine in detail all
links in and out of a page. For example, before deleting a page, you can use this view to identify
the Web pages with links to the page.

You can modify Hyperlinks view to do the following:
¦ Show page titles: Right-click in Hyperlinks view and select Show Page Titles from the
context menu to display page titles instead of filenames. Repeat the process to deselect
page title display.
¦ Hyperlinks to Pictures: Right-click in Hyperlinks view and select Hyperlinks to
Pictures from the context menu to display links that lead to graphics files. You can
toggle off picture links in the same way.
¦ Repeated Hyperlinks: To display multiple hyperlinks with the same target URL, right-
click in Hyperlinks view and select Repeated Hyperlinks from the context menu.
Repeat the process to deselect this option to turn it off.

Tasks view
Tasks view contains a list of “things to do.” Tasks are added to the Tasks view list by
wizards that generate Webs, or you can add them yourself.
To add a task, follow these steps:
1. Select Tasks from the Views bar.
2. Select Edit _ Tasks _ Add Task, or right-click in Tasks view and select Add Task
from the context menu. The New Task dialog box opens, as shown in Figure 7-17.

Figure 7-17 Defining a task
Chapter 7 ¦ Building FrontPage Web Sites 163

3. Enter a task name and a description. You can also modify the Assigned To box. Select
one of the three priority radio buttons to assign a relative level of urgency to the task.
4. Click OK. The task appears in the task list.
Tasks that are created with a page open are associated with that page. You can start these tasks
by right-clicking the task in Tasks view and selecting Start Task from the context menu.
The context menu that opens when you right-click a task can be used to edit, mark as
completed, or delete any task. However, only those tasks that were created with a page open
(or generated from a wizard) can be started by right-clicking.

Global Site Editing
Most of the work you do to edit you Web site™s content takes place in Page view, and is done
on a page-by-page basis. However, some editing tools in FrontPage work across an entire
Web. This section looks at two of these tools: spell checking, and search and replace.

Spell checking your entire site
To spell check your entire Web site, select Tools _ Spelling from a view other than Page view.

If you select Tools _ Spelling in Page view, or click the Spelling tool in the Standard toolbar,
you spell check only your open page. When you select the Spelling dialog box (in a view other
than Page view), the dialog box has two radio buttons: Selected Page(s) and Entire Web. To
spell check your entire Web site, use the Entire Web option.

You can also select the checkbox labeled Add a Task for Each Page with Misspellings. This
creates a list of pages that need their spelling checked. After you select these options, click
the Start button to begin checking your spelling.
FrontPage checks all of your pages for spelling errors and then creates a list in the Spelling
dialog box, as shown in Figure 7-18.

Figure 7-18 Checking an entire Web site generates a list of pages with spelling mistakes.
Part I ¦ Getting Functional with Office 2003

If you selected the Add a Task option, you can click the Add Task button to add the
marked pages to your task list. If you would rather correct your spelling immediately,
double-click the page in the provided list in the Spelling dialog box to check spelling on
that page.

Replacing text throughout a site
To replace text throughout a site, select Edit _ Replace in any view. In the Replace dialog
box, enter the text you want to find in the Find What text box, and specify replacement text
in the Replace With text box. The Replace dialog box includes the following options:
¦ Click the All Pages radio button to replace in every page.

The Direction drop-down menu defines the direction in which the replacing tool moves through
Web pages. But it is only active when you are editing the current page, not when you replace
throughout your entire site.

¦ The Match Whole Word Only and Match Case checkbox options work like the Replace
dialog box in Word or other Office applications.
¦ The Find in HTML checkbox enables you to search and replace HTML code.
After you define your replace options, if you are replacing text in an entire Web, click the
Find in Web button. FrontPage will generate a list of pages at the bottom of the Replace
dialog box with the text to be replaced. Double-click a page to make the changes in that
page. Alternatively, click the Add Task button to add the task to your task list.

Editing Web page content
In the following tutorial, you will experiment with adding content to a Web page.
1. With a FrontPage Web open, choose Navigation view from the View bar.
2. In Navigation view, double-click the home page to open it in Page view.
3. Type Welcome to my Web site at the top of your home page and press Enter.
4. Click and drag to select the text that you typed. Select Arial Black from the Font drop-
down list; 24 point from the Font Size list; Italics; Center; and Red, from the Font
Color palette.
5. Click at the end of the text and select Insert _ Horizontal Line.
6. Under the horizontal line, select Insert _ Symbol and double-click the © symbol. Click
Close. Type your name after the copyright symbol.
7. Select Insert _ Break and, with the Normal Line Break radio button selected, click OK
to create a forced line break.
8. Select Insert _ Comment and, in the Comment window, type This page needs to be
finished! Click OK.
Chapter 7 ¦ Building FrontPage Web Sites 165

9. Double-click the word “Welcome” and select Insert _ Bookmark. Click OK in the
Bookmark dialog box.
10. Click to place your insertion point after the comment text. Press Enter 12 times and
then type Go to top.
11. Double-click to select the word “top,” and then click the Hyperlink button in the
toolbar. Pull down the Bookmark list and select Welcome. Click OK.
12. On the Standard toolbar, click the New drop-down button and choose Task. Enter Add
Content in the Task Name text box. Click OK.
13. Click the Save button to save changes to the Web page.
14. Select View _ Reports to get an overview of your (rather small) Web site. How much
server space would you need for this Web site? (Hint: Look at the All Files row of the
15. Select Hyperlinks view. Right-click and select Hyperlinks Inside Page from the context
menu. The links illustrate the bookmark link in the page.
16. Click the Tasks view. Right-click the task and select Start Task from the context menu.
Add some text to your page and save it. Select Yes in the dialog box when prompted to
mark the page as a completed task.

In designing your Web site, start by placing yourself in the shoes of a visitor. What informa-
tion do you want to present right on the home page? What options do you want to make
available from the home page? You can translate your vision into a real site design in
FrontPage™s Navigation view ” where you drag pages into a flowchart.
FrontPage will generate automatic links on pages based on your Navigation view structure.
These links are created in Link bars, which can be placed on pages, or in shared borders that
are embedded in each page in your Web site (or most pages).
Once you design a site in FrontPage, you can use the Import tools to add other files from
your computer or from the Internet. Or, you can integrate an already existing site into your
FrontPage Web site.
FrontPage makes it fast and easy to create complex Web sites using templates, including an
instant Corporate Presence Web, a Customer Support Web, and even an instant online
Creating page content is very similar to editing text in Microsoft Word. Additional page
components like line breaks, symbols, and horizontal lines are available as well.
Once you have created a FrontPage Web site, global site editing tools are available, includ-
ing spell checking and site-wide search and replace.
¦ ¦ ¦

and Creating
Access Reports . . . .

In This Chapter

Understanding the types
of reports you can create

R eports provide the most flexible way for viewing and
Knowing the differences
printing summarized information. Reports display
between a report and a
information with the desired level of detail, while enabling you to
view or print your information in almost any format. You can add
multilevel totals, statistical comparisons, and pictures and
Understanding the
graphics to a report. In this chapter, you learn to use Report
process of creating
Wizards as a starting point. You also learn how to create reports
and what types of reports you can create with Access.

Creating reports with a
In this chapter, you will create new reports using the report wiz- Report Wizard
ards and by creating a blank report without using a wizard. You
will use tables created in chapters from the Access 2003 Bible. If
Viewing, printing, and
you are following the examples and own a copy of Access 2003
saving reports
Bible, you would use the Chap13Start.mdb database file on the
CD-ROM that comes with thatbook and follow the instructions in
Creating a report from a
each section of the chapter.
blank form

Sorting and grouping data
Understanding Reports
Adding label and text
Reports are used for presenting a customized view of your data. controls to your report
Your report output can be viewed onscreen or printed to a hard
copy device. Reports provide the capability to control
Modifying the appearance
summarization of the information. Data can be grouped and sorted
of text and label controls
in any order and then presented in the order of the groupings. You
can create totals that add numbers, calculate averages or other
Adding page breaks
statistics, and display your data graphically. You can print pictures
and other graphics as well as memo fields in a report. If you can
Copying an existing report
think of a report you want, Access can probably create it.

. . . .
Part I ¦ Getting Functional with Office 2003

What types of reports can you create?
Four basic types of reports are used by businesses:
¦ Tabular reports. These print data in rows and columns with groupings and totals.
Variations include summary and group/total reports.
¦ Columnar reports. These print data as a form and can include totals and graphs.
¦ Mail-merge reports. These create form letters.
¦ Mailing labels. These create multicolumn labels or snaked-column reports.

Tabular reports
Figure 8-1 is a typical tabular-type report in the Print Preview window. Tabular reports (also
known as groups/totals reports) are generally similar to a table that displays data in neat
rows and columns. Tabular reports, unlike forms or datasheets, usually group their data by
one or more field values; they calculate and display subtotals or statistical information for
numeric fields in each group. Some groups/totals reports also have page totals and grand
totals. You can even have snaked columns so that you can create directories (such as
telephone books). These types of reports can use page numbers, report dates, or lines and
boxes to separate information. They can have color and shading and can display pictures,
business graphs, and memo fields, like forms. A special type of tabular report, summary
reports, can have all the features of a tabular report but not print the detail records.

Figure 8-1: A tabular report in the Print Preview window of Access 2003.
Chapter 8 ¦ Understanding and Creating Access Reports 169

Columnar reports
Columnar reports (also known as form reports) generally display one or more records per
page, but do so vertically. Columnar reports display data very much as a data-entry form
does, but the report is used strictly for viewing data and not for entering data. Figure 8-2 is
part of a typical columnar report from the Access Auto Auctions database system in the
Print Preview window.

Figure 8-2: A columnar report showing report controls distributed throughout
the entire page.

Another type of columnar report, known as a form/subform report, generally displays one
main record per page (like a business form) but can show many records within embedded
subforms. An invoice is a typical example. This type of report can have sections that display
only one record and at the same time have sections that display multiple records from the
many side of a one-to-many relationship ” and even include totals.
Part I ¦ Getting Functional with Office 2003

Figure 8-3 shows an invoice report from the Access Auto Auctions database system in the
Print Preview window.

Figure 8-3: An invoice report.

Mailing labels
Mailing labels are also a type of report. You can easily create mailing labels, shown in
Figure 8-4, using the Label Wizard to create a report in Access. The Label Wizard enables
you to select from a long list of Avery label (and other vendors) paper styles, after which
Access correctly creates a report design based on the data you specify to create your label.
After the label is created, you can open the report in design mode and customize it as
Chapter 8 ¦ Understanding and Creating Access Reports 171

Figure 8-4: A typical mailing-label report in the Print Preview window.

The difference between reports and forms
The main difference between reports and forms is the purpose of the output. Whereas forms
are primarily for data entry, reports are for viewing data (either onscreen or in hard copy
form). Calculated fields can be used with forms and can calculate an amount based on the
fields in the record. With reports, you calculate on the basis of a common group of records, a
page of records, or all the records processed during the report. Anything you can do with a
form ” except data input ” can be duplicated by a report. In fact, you can save a form as a
report and then customize the form controls in the Report Design window.
Part I ¦ Getting Functional with Office 2003

The process of creating a report
Planning a report begins long before you actually create the report design. The report
process begins with your desire to view your data in a table, but in a way that differs from
datasheet display. You begin with a design for this view; Access begins with raw data. The
purpose of the report is to transform the raw data into a meaningful set of information. The
process of creating a report involves several steps:
¦ Defining the report layout
¦ Assembling the data
¦ Creating the report design using the Access Report Design window
¦ Printing or viewing the report

Defining the report layout
You should begin by having a general idea of the layout of your report. You can define
the layout in your mind, on paper, or interactively using the Access Report Design
window. Figure 8-5 is a report layout created with Microsoft Word and served as a
design from an analyst to a developer. This served as the basic design for the report
shown in Figure 8-1.Good reports can first be laid out on paper, showing the fields needed
and the placement of the fields.

Figure 8-5: A sample report layout.
Chapter 8 ¦ Understanding and Creating Access Reports 173

Assembling the data
After you have a general idea of your report layout, you should assemble the data needed for
the report. A report can use data from a single database table or from the results of a query
dynaset. You can link many tables with a query and then use the result of the query (its
dynaset) as the record source for your report. A dynaset appears in Access as if it were a
single table.You can select the fields, records, and sort order of the records in a query.
Access treats this dynaset data as a single table (for processing purposes) in datasheets,
forms, and reports. The dynaset becomes the source of data for the report and Access
processes each record to create the report. The data for the report and the report design are
entirely separate. In the report design, the field names to be used in the report are specified.
Then, when the report is run, Access matches data from the dynaset or table against the
fields used in the report and uses the data available at that moment to produce the report.
In this example, you will use data from only the tblProducts table.

Creating a Report with Report Wizards
With Access, you can create virtually any type of report. Some reports, however, are more
easily created than others, when a Report Wizard is used as a starting point. Like Form
Wizards, Report Wizards give you a basic layout for your report, which you can then
Report Wizards simplify the layout process of your fields by visually stepping you through a
series of questions about the type of report that you want to create and then automatically
creating the report for you. In this chapter, you use Report Wizards to create both tabular and
columnar reports.

Creating a new report
You can choose from many ways to create a new report, including the following:
¦ Select Insert_Report from the main menu when the Database window is selected.
¦ Select the Reports object button and press the New toolbar button on the Database
¦ From the Database window, the datasheet, or the query toolbar, click the New
Object down arrow and select Report.
Regardless of how you start a new report, the New Report dialog box appears. The dialog
box in the figure is already filled in with the choices you are about to make.
The New Report dialog box enables you to choose from among six ways to create a report:
¦ Design View. Displays a completely blank Report Design window for you to start
¦ Report Wizard. Helps you create a tabular report by asking you many questions.
¦ AutoReport: Columnar. Creates an instant columnar report.
Part I ¦ Getting Functional with Office 2003

¦ AutoReport: Tabular. Creates an instant tabular report.
¦ Chart Wizard. Helps you create a business graph.
Label Wizard. Helps you create a set of mailing labels.
To create a new report using a Report Wizard, follow these steps:
For the example below, use the tblProducts table:
1. Create a new report by first selecting the Reports object button and then pressing
the New toolbar button.
2. In the New Report dialog box, select Report Wizard.
3. Select the table tblProducts and click OK.
4. Press the OK button to move to the next Report Wizard screen.

Choosing the data source
If you begin creating the report with a highlighted table or from a datasheet or query, the
table or query you are using is displayed in the Choose the table or query box. Otherwise,
you can enter the name of a valid table or query before continuing. You can also choose
from a list of tables and queries by clicking the combo box selection arrow. In this example,
you use the Hospital Report query you saw in Figure 10-5, which creates data for customer
visits on the date 7/11/01.

If you begin creating a report in Design View, you don™t need to specify a table or query in the
New Report dialog box because you can select the Record Source later on from the Properties

Choosing the fields
After you select the Report Wizard and click the OK button, a field selection box appears.
This box is virtually identical to the field selection box used in Form Wizards. In this
example, select the fields from left to right (shown in Figure 8-6).
1. Select the chrCategory field and press the Select Field button (>) to place the field
in the Selected Fields: area.
2. Repeat for the chrProductID, chrDescription, intQtyInStock, curCost,
curRetailPrice, and curSalePrice fields and press the Select Field button (>) each
time to place the field in the Selected Fields: area.
3. Click the Next button when you are through to move to the next wizard screen.

You can double-click any field in the Available Fields list box to add it to the Selected Fields list
box. You can also double-click any field in the Selected Fields list box to remove it from the box.
Access then redisplays the field in the Available Fields list box.
Chapter 8 ¦ Understanding and Creating Access Reports 175

Figure 8-6: Selecting report fields.

You are limited to selecting fields from the original record source you started with. You can
select fields from other tables or queries by using the Tables/Queries: combo box in this wizard
screen. As long as you have specified valid relationships so that Access can link the data, these
fields are added to your original selection and you can use them on the report. If you choose
fields from tables that don™t have a relationship, a dialog box will ask you to edit the
relationship and join the tables. Or you can return to the Report Wizard and remove the fields.
After you have selected your data, click the Next button to go to the next wizard dialog box.

Selecting the grouping levels
The next dialog box enables you to choose which field(s) you want to use for a grouping. In
this example, Figure 8-7 shows the chrCategory field selected as the only group field. This
step designates the field(s) to be used to create group headers and footers. Groups are used
to combine data with common values.
Using the Report Wizard, you can select up to four different group fields for your report;
you can change their order by using the Priority buttons. The order you select for the group
fields is the order of the grouping hierarchy.
Select the chrCategory field as the grouping field and click (>). Notice that the picture
changes to graphically show chrCategory as a grouping field, as shown in Figure 8-7. This
means that data will be grouped or separated by category and also totaled as well if the
report chosen supports summarized footers.
After you select the group field(s), click the Grouping Options button at the bottom of the
dialog box to display another dialog box, which enables you to further define how your
report will use the group field.
You will learn more about groups, headers, and footers later in this chapter.
Part I ¦ Getting Functional with Office 2003

Figure 8-7: Selecting report group fields.

Defining the group data
The Grouping Options dialog box, which is displayed by pressing the Grouping Options ¦
button in the lower-left corner of the Report Wizard screen, enables you to further define the
grouping. This selection can vary in importance, depending on the data type.
The list box displays different values for the various data types:
¦ Text. Normal, 1st Letter, 2 Initial Letters, 3 Initial Letters, 4 Initial Letters, 5 Initial
¦ Numeric. Normal, 10s, 50s, 100s, 500s, 1000s, 5000s, 10000s, 50000s, 100000s.
¦ Date. Normal, Year, Quarter, Month, Week, Day, Hour, Minute.
Normal means that the grouping is on the entire field. In this example, use the entire
Customer Name field. By selecting different values of the grouping, you can limit the group
values. For example, suppose you are grouping on the Product ID field. A typical Product
ID value is CAR-01. The characters to the left of the ” represent the category and the
numbers to the right of the ” are a sequential number. By choosing the Product ID field for
the grouping and then selecting 3 Initial Letters as the grouping data, you can group the
products by their category.
In this example, the default text-field grouping option of Normal is acceptable.
If you displayed the Grouping Options dialog box, click the OK button to return to the
Grouping levels dialog box.
Click the Next button to move to the Sort order dialog box.
Chapter 8 ¦ Understanding and Creating Access Reports 177

Selecting the sort order
Access sorts the Group record fields automatically in an order that helps the grouping make
sense. The additional sorting fields specify fields to be sorted in the detail section. In this
example, Access is already sorting the data by the chrCategory field in the group section. As
Figure 8-8 shows, the data is also to be sorted by Product ID so that the products appear in
alphabetical order in the detail section.

Figure 8-8: Selecting the field sorting order.

The sort fields are selected by the same method that is used for grouping fields in the report.
You can select fields that you have not already chosen to group and use these as sorting
fields. The fields chosen in this dialog box do not affect grouping; they affect only the
sorting order in the detail section fields. You can determine whether the order is ascending
or descending by clicking the button to the right of each sort field, which toggles between
Ascending and Descending.

Selecting summary options
At the bottom of the sorting dialog box is a button named Summary Options. Clicking this
button displays the dialog box shown in Figure 8-9. This dialog box provides additional
options for numeric fields. As you can see in Figure 8-9, all of the numeric and currency
fields are displayed and selected to be summed. Additionally, you can display averages,
minimums, and maximums.
Sum should be checked. You can also decide whether to show or hide the data in the detail
section. If you select Detail and Summary, the report shows the detail data; selecting
Summary Only hides the detail section and shows only totals in the report.
Part I ¦ Getting Functional with Office 2003

Finally, checking the box labeled Calculate percent of total for sums adds the percentage of
the entire report that the total represents below the total in the group footer. If, for example,
you had three products and their totals were 15, 25, and 10, respectively, they would show
30%, 50%, and 20% below their total (that is, 50) ” indicating the percentage of the total
sum (100%) represented by their sum.
Clicking the OK button in this dialog box returns you to the sorting dialog box. There you
can click the Next button to move to the next wizard dialog box.

Figure 8-9: Selecting the summary options.

Selecting the layout
Two more dialog boxes affect the look of your report. The first (shown in Figure 8-10)
enables you to determine the layout of the data. The Layout area provides six layout choices;
these tell Access whether to repeat the column headers, whether to indent each grouping,
and whether to add lines or boxes between the detail lines. As you select each option, the
picture on the left changes to show the effect.
The Orientation area enables you to choose between a Portrait (up-and-down) and a
Landscape (across-the-page) layout. This choice affects how it prints on the paper. Finally,
the check mark next to “Adjust the field width so all fields fit on a page” enables you to
cram a lot of data into a little area. (Magnifying glasses may be necessary!)
For this example, choose Stepped and Landscape, as shown in Figure 8-10. Then click on
the Next button to move to the next dialog box.
Chapter 8 ¦ Understanding and Creating Access Reports 179

Figure 8-10: Selecting the page layout.

Choosing the style
After you choose the layout, you can choose the style of your report from the dialog box
shown in Figure 8-11. Each style has different background shadings, font size, typeface, and
other formatting. As each is selected, the picture on the left changes to show a preview. For
this example, choose Casual (as shown in Figure 8-11). Finally, click the Next button to
move to the last dialog box.

Figure 8-11: Choosing the style of your report.

You can customize the styles, or add your own, by using the AutoFormat option from the Format
menu of the Report Design window and choosing Customize.
Part I ¦ Getting Functional with Office 2003

Opening the report design
The final Report Wizard dialog box contains a checkered flag, which lets you know that
you™re at the finish line. The first part of the dialog box enables you to enter a title for the
report. This title will appear once at the beginning of the report, not at the top of each page.
The default is the name of the table or query you used initially.
Change the report name to rptProductsCh13.
Next, you can choose one of the option buttons at the bottom of the dialog box:
¦ Preview the report
¦ Modify the report™s design
For this example, leave the default selection intact to preview the report. When you click the
Finish button, your report is displayed in the Print Preview window. Name the report
rptProducts. Click Finish to complete the Report Wizard and view the report.

Using the Print Preview window
Figure 8-12 displays the Print Preview window in a zoomed view of page 2. This view
displays your report with the actual fonts, shading, lines, boxes, and data that will be on the
printed report. When the Print Preview mode is in a zoomed view, pressing the mouse
button changes the view to a page preview that shows the entire page.

Figure 8-12: Displaying a report in the zoomed preview mode.
Chapter 8 ¦ Understanding and Creating Access Reports 181

You can move around the page by using the horizontal and vertical scrollbars. Use the Page
controls (at the bottom-left corner of the window) to move from page to page. These
controls include VCR-like navigation buttons to move from page to page or to the first or
last page of the report. You can also go to a specific page of the report by entering a value in
the text box between the previous and next controls.
Figure 8-13 shows a view of the report in the multi-page preview mode of Print Preview.
The sixth icon from the left displays up to six pages at a time. The magnifying glass mouse
pointer selects part of the page to zoom in. In Figure 8-13, you can see a representation of
the printed page. Use the navigation buttons (in the lower-left section of the Print Preview
window) to move between pages, just as you would to move between records in a datasheet.
The Print Preview window has a toolbar with commonly used printing commands.

Figure 8-13: Displaying a report in Multiple Pages Print Preview™s page preview mode.

If, after examining the preview, you are satisfied with the report, select the Printer button on
the toolbar to print the report. If you are dissatisfied, select the Close button to return to the
design window; Access takes you to the Report Design window to make further changes.
Part I ¦ Getting Functional with Office 2003

Viewing the Report Design window
When you click Design View (the left-most button on the toolbar), Access takes you to the
Report Design window, which is similar to the Form Design window. The major difference
is in the sections that make up the report design. As shown in Figure 8-14, the report design
reflects the choices you made using the Report Wizard.

Figure 8-14: The Report Design window.

You may also see the Toolbox, Sorting and Grouping dialog box, property sheet, and Field List
window, depending on whether you pressed the toolbar buttons to see these tools. You learn to
change the design of a report in this chapter. For more detailed information on changing report
design, see Chapters 14, 15, and 16 of the Access 2003 Bible.

You can return to the Print Preview mode by selecting the Print Preview button on the
Report Design toolbar or by selecting the Print Preview option on the File menu. You can
also select Print or Page Setup from the File menu. This menu also provides options for
saving your report.

Printing a Report
You can print one or more records in your report, exactly as they look onscreen, using one of
these methods:
¦ Click File_Print in the Report Design window.
¦ Click the Print button in the Preview window.
¦ Click File_Print in the Database window (with a report highlighted).
Chapter 8 ¦ Understanding and Creating Access Reports 183

If you select File_Print, a standard Microsoft Windows Print dialog box appears. You can
select the print range, number of copies, and print properties. If you click the Print button,
the report goes immediately to the currently selected printer without displaying a Print
dialog box.

Saving the Report
You can save the report design at any time by selecting File_Save, or File_Save As, or
File_Export from the Report Design window, or by clicking the Save button on the toolbar.
The first time you save a report (or any time you select Save As or Export), a dialog box
enables you to select or type a name.

Starting with a Blank Form
There are many tools available in the Report Design window. When you create reports, you
use some of these tools in a slightly different manner from the way they are used to create
forms. Therefore, it is important to review some of the unique report menus and toolbar
You can view a report in three different views: Design View, Layout Preview, and Print
Preview. You can also print a report to the hard copy device defined for Microsoft Windows.
This chapter focuses on the Report Design window.
The Report Design window is where you create and modify reports. The empty Report
Design window, shown in Figure 8-15, contains various tools, including the Toolbox.

Figure 8-15: The Report Design window, showing the Toolbox.
Part I ¦ Getting Functional with Office 2003

The Design Window toolbar
The Report Design toolbar is shown in Figure 8-16. You click the button you want for quick
access to such design tasks as displaying different windows and activating wizards and
utilities. Table 8-1 summarizes what each item on the toolbar does. (The table defines each
tool from left to right on the toolbar.)

Figure 8-16: The Report Design toolbar.

The Report Design toolbar is distinct from the Format toolbar. To make such changes as font
selection and justification, you must first make sure that the Formatting (Form/Report)
design toolbar is displayed.

Table 8-1
The Design View Toolbar
Toolbar Item Description
Report View button Drop-down box displays the three types of views available
Save button Saves the current report design

File Search button Finds text within a database or on your computer

Print button Prints a form, table, query, or report

Print Preview button Toggles to print preview mode

Cut button Removes selection from the document and adds it to the

Copy button Copies the selection to the Clipboard

Paste button Copies the Clipboard contents to the document

Format Painter button Copies the style of one control to another

Undo/Redo button Undoes/redoes previous commands

Insert Hyperlink button Inserts hyperlink

Field List button Displays or hides the Field List window

Toolbox button Displays or hides the Toolbox

Sorting and Grouping
button Displays or hides the Sorting and Grouping box

AutoFormat button Applies a predefined format to a form or report
Chapter 8 ¦ Understanding and Creating Access Reports 185

Table 2-8 (continued)
Toolbar Item Description

Code button Displays or hides the Module window

Properties button Displays the properties sheet for the selected item

Build button Displays the Builder or Wizard for selected control or item

Database Window
button Displays the Database window

New Object button Creates a new object

Microsoft Access
Help button Displays Access Help

The tools on the Report Design screen are virtually identical to the Form Design tools.

Banded Report Writer Concepts
In a report, your data is processed one record at a time. Depending on how you create your
report design, each data item is processed differently. Reports are divided into sections,
known as bands in most report-writing software packages. (In Access, these are simply
called sections.) Access processes each data record from a table or dynaset, processing each
section in order and deciding (for each record) whether to process fields or text in each
section. For example, the report footer section is processed only after the last record is
processed in the dynaset.
A report is made up of groups of details ” for example, as shown in Figure 8-17, all the
products sold by category. Each group must have an identifying group header, which for the
first category in this example is Minivans. Each group also has a footer where you can
calculate the total cost and profit for each category. For Minivans, the total profit is
$17,063. The page header contains column descriptions; the report header contains the
report title. Finally, the report footer contains grand totals for the report, and the page footer
prints the page number.
The Access sections are listed below:
¦ Report header. Prints only at the beginning of the report; used for title page.
¦ Page header. Prints at the top of each page.
¦ Group header. Prints before the first record of a group is processed.
¦ Detail. Prints each record in the table or dynaset.
Part I ¦ Getting Functional with Office 2003

¦ Group footer. Prints after the last record of a group is processed.
¦ Page footer. Prints at the bottom of each page.
¦ Report footer. Prints only at the end of a report after all records are processed.
Figure 8-17 shows these sections superimposed on a report.

Figure 8-17: Typical Report Writer sections.

How sections process data
Most sections are triggered by changes in the values of the data. Table 8-2 shows the records
that make up the dynaset for the Products Summary Report (Yes indicates that a section is
triggered by the data).
Chapter 8 ¦ Understanding and Creating Access Reports 187

Table 8-2
Processing Report Sections
Category Product Report Page Category Detail Category Page Report
Name Name Header Header Header Footer Footer Footer
Minivans Mini-03 Yes Yes Yes Yes No No No

Minivans Mini-101 No No No Yes No No No

Minivans Mini-102 No No No Yes No No No

Minivans Mini-103 No No No Yes No No No

Minivans Mini-104 No No No Yes No No No

Minivans Mini-105 No No No Yes No No No

Minivans Mini-115 No No No Yes Yes No No

Homes Mot-01 No No Yes Yes Yes No No

SUV SUV-076 No No Yes Yes No No No

SUV SUV-101 No No No Yes No No No

SUV SUV-102 No No No Yes No No No

SUV SUV-103 No No No Yes No No No

SUV SUV-104 No No No Yes No No No

SUV SUV-111 No No No Yes No No No

SUV SUV-112 No No No Yes No No No

SUV SUV-113 No No No Yes No No No

SUV SUV-568 No No No Yes Yes Yes No

As you can see, Table 8-2 shows 17 records. Three groups of records are grouped by the
category. There are seven Minivans, one Motor Homes, and nine SUVs. Each record in the
table has corresponding columns for each section in the report. “Yes” means that the record
triggers processing in that section; “No” means that the section is not processed for that
record. This report is only one page, so it is very simple.
The report header section is triggered by only the first record in the reports dynaset. This
section is always processed first, regardless of the data. The report footer section is triggered
only after the last record is processed, regardless of the data.
Part I ¦ Getting Functional with Office 2003

Access processes the page header section after the report header section for the first record
and then every time a new page is started. The page footer section is processed at the bottom
of each page and after the report footer section of the last page.
Group headers are triggered only by the first record in a group. Group footers are triggered
only by the last record in a group. Notice that the Mot-01 Motor Homes record triggers both
a group header and a group footer because it is the only record in a group. If three or more
records are in a group, only the first or the last record can trigger a group header or footer;
the middle records trigger only the detail section.
Access always processes each record in the detail section (which is always triggered,
regardless of the value of a data item). Most reports with a large amount of data have many
detail records and significantly fewer group header or footer records. This small report has
as many group header and footer records as it has detail records.

The Report Writer sections
Figure 8-18 shows what a report design looks like in Access. It is the Report Design window
for the Products Summary Report. As you can see, the report is divided into seven sections.
The group section displays data grouped by Categories, so you see the sections chrCategory
Header and chrCategory Footer. Each of the other sections is also named for the type of
processing it performs.

Figure 8-18: The Report Design window.

You can place any type of text or field controls in any section, but Access processes the data
one record at a time. It also takes certain actions (based on the values of the group fields, the
location of the page, or placement in the report) to make the bands or sections active. The
example in Figure 8-18 is typical of a report with multiple sections. As you learned, each
section in the report has a different purpose and different triggers.
Chapter 8 ¦ Understanding and Creating Access Reports 189

Page and report headers and footers must be added as pairs. To add one without the other,
after the section is added, resize the section you don™t want to a height of zero or set its Visible
property to No.

If you remove a header or footer section, you also lose the controls in those sections.

Report header section
Controls in the report header section are printed only once at the beginning of the report. A
common use of a report header section is as a cover page or a cover letter or for information
that needs to be communicated only once to the user of the report.
You can also have controls in the report header section print on a separate page, which
enables you to create a title page and include a graphic or picture in the section. There is a
Force New Page property in the Report Header that can be set to After Section that will place
the information in the Report Header into a separate page.
In Figure 8-17, the report header section is not used.

Only data from the first record can be placed in a report header.

Page header section
Text or field controls in the page header section normally print at the top of every page. If a
report header on the first page is not on a page of its own, the information in the page header
section prints just below the report header information. Typically, page headers serve as
column headers in group/total reports; they can also contain a title for the report. In this
example, placing the Products Summary report title in the Page Header section means that
the title appears on every page.
The page header section shown in Figure 8-18 also has lines above and below the label
controls. Each of the report™s label controls is separate and each can be moved or sized
individually. You can also change special effects (such as color, shading, borders, line
thickness, font type, and font size) for each text control.
Both the page header and page footer sections can be set to one of four settings (this setting
can be found in the Report™s properties, not the section properties):
¦ All Pages. Both the page header and page footer print on every page.
¦ Not with Report Header. Neither the page header nor footer prints on a page with
the report header.
¦ Not with Report Footer. The page header does not print with the report footer. The
report footer prints on a new page.
¦ Not with Report Header/Footer. Neither the page header nor the footer prints on a
page with the report header or footer.
Part I ¦ Getting Functional with Office 2003

Group header
Group headers sections normally display the name of the group. Access knows when all the
records in a group have been displayed in a detail section when the group name changes. In
this example, the detail records are about products and their costs and profits. The group
header field control chrCategory tells you that these products are of a specific category type.
Group header sections immediately precede detail sections.
It is possible to have multiple levels of group headers and footers. In this report, for
example, the data is only for categories. However, in some reports you might have groups of
information with date values. You could group your sections by year or month and year, and
within those sections by another group such as category.

To set group-level properties such as Group On, Group Interval, Keep Together, or something
other than the default, you must first set the Group Header and Group Footer property (or both)
to Yes for the selected field or expression. You will learn about these later in the chapter.

Detail section
The detail section processes every record in the data and is where each value is printed. The
detail section frequently contains a calculated field such as profit that is the result of a
mathematical expression. In this example, the detail section simply displays information
from the tblProduct table except for the last control. The profit is calculated by subtracting
the value of curCost from the value of curSalePrice.

You can tell Access whether you want to display a section in the report by changing the section™s
Tip Visible property in the Report Design window. Turning off the display of the detail section (or by
excluding selected group sections) displays a summary report with no detail or with only certain
groups displayed.

Group footer
You use the group footer section to calculate summaries for all the detail records in a group.
In the Products Summary report, the expression =Sum([curSalePrice] - [curCost]) adds all
the calculations of Sale Price ” Cost for a specific category. In the Minivans group, this
expression sums the seven records. This type of field is automatically reset to 0 every time
the group changes.

You can change the way summaries are calculated by changing the Running Sum property of
the field box in the Report Design window.

Page footer
The page footer section usually contains page numbers or control totals. In very large
reports, you may want page totals as well as group totals (such as when you have multiple
pages of detail records with no summaries). For the Products Summary Report, the page
Chapter 8 ¦ Understanding and Creating Access Reports 191

number is printed by combining the text Page, and built-in page number controls show Page
x of y where x is the current page number and y is the total number of pages in the report. A
text box control with the following expression in the Control Source property can be used to
display page number information.
=“Page: ” & [Page] & “ of ” & [Pages]
(which keeps track of the page number in the report).
You can also print the date and the time printed. Figures 8-18 and 8-19 show the date printed
in the Page Footer section as well as the page numbers.

Report footer
The report footer section is printed once at the end of the report after all the detail records
and group footer sections are printed. Report footers typically display grand totals or other
statistics (such as averages or percentages) for the entire report. The report footer for the
Products Summary report uses the expression =Sum with each of the numeric fields to sum
the amounts.

When there is a report footer, the page footer section is printed after the report footer.

The Report Writer in Access is a two-pass report writer, capable of preprocessing all records
to calculate the totals (such as percentages) needed for statistical reporting. This capability
enables you to create expressions that calculate percentages as Access processes those
records that require foreknowledge of the grand total.

Creating a New Report
Fundamental to all reports is the concept that a report is another way to view the records
in one or more tables. It is important to understand that a report is bound to either a single
table or a query that brings together data from one or more tables. When you create a
report, you must select which fields from the query or table you want to see in your report.
Unless you want to view all the records from a single table, bind your report to a query.
Even if you are accessing data from a single table, using a query lets you create your
report on the basis of a particular search criterion and sorting order. If you want to access
data from multiple tables, you have almost no choice but to bind your report to a query. In
the examples in this chapter, all the reports are bound to a query (even though it is
possible to bind a report to a table).

Access lets you create a report without first binding it to a table or query, but you will have no
fields on the report. This capability can be used to work out page templates with common text
headers or footers such as page numbering or the date and time, which can serve as models for
other reports. You can add fields later by changing the underlying control source of the report.
Part I ¦ Getting Functional with Office 2003

Throughout this chapter, you learn the tasks necessary to create the Products Display
Report (the partial first page is shown in Figure 8-19). In this chapter, you design the basic
report, assemble the data, and place the data in the proper positions. You can learn more
about enhancing your reports by adding lines, boxes, and shading so that certain areas
stand out in Wiley™s Access 2003 Bible, chapter 14.
As with almost every task in Access, there are many ways to create a report without
wizards. It is important, however, to follow some type of methodology, because creating a
good report involves a fairly scientific approach. You should create a checklist that is a set
of tasks that will result in a good report every time. As you complete each task, check it
off your list. When you are done, you will have a great-looking report. The following
section outlines this approach.

Figure 8-19: The Products Summary report.
Chapter 8 ¦ Understanding and Creating Access Reports 193

Creating a new report and binding it to a query
The first step is to create a new report and bind it to the tblProducts table. Follow these steps
to complete this process:
1. Press F11 to display the Database window if it is not already displayed.
2. Click the Reports object button.
3. Click the New toolbar button. The New Report dialog box appears.
4. Select Design View.
5. Click the combo box which label starts with Choose a table or query. A drop-down
list of all tables and queries in the current database appears.
6. Select the tblProducts table.
7. Click OK.
8. Maximize the Report window.
A blank Report Design window appears (see Figure 8-20). Notice the three sections in the
screen display: Page Header, Detail, and Page Footer. The report is bound to the table
tblProducts. This means that the fields from the table are available for use in the report
design and that they appear in the Field List window. It also means that the data from that
table will be displayed when the report is viewed or printed.

Figure 8-20: A blank Report Design window.
Part I ¦ Getting Functional with Office 2003

Defining the report page size and layout
As you plan your report, consider the page-layout characteristics as well as the kind of
paper and printer you want to use for the output. If you use a dot-matrix printer with a
wide-carriage feed, you design your report differently than for printing on a laser printer
with 8½ x 11-inch paper. After you make these decisions, you use several dialog boxes
and properties to make adjustments; these items work together to create the desired
First, you need to select the correct printer and page-layout characteristics by selecting
File_Page Setup. The Page Setup dialog box enables you to select your printer and set
printer options.
The Page Setup dialog box has three tabs: Margins, Page, and Columns. The information
under the Page tab is divided into three sections:
¦ Orientation. Select the page orientation you want.
¦ Paper. Select the paper size and paper source you want.
¦ Printer. Select the printer you want.

Note If you click the Printer button, the Page Setup dialog box for the selected printer appears.
Clicking Properties will then display a more extensive dialog box with all the applicable options.

The design for Product Summary report is to be a portrait report, which is taller than it is
wide. You want to print on letter size paper that is 8½ x 11 inches, and you want the left,
right, top, and bottom margins all set to 0.250 or the minimum your printer will allow.
Follow these steps to create the proper report setup for the Products Summary report:
1. Open the Page Setup dialog box and select the Page tab.
2. Click the Portrait option button.
Next to the Orientation buttons are two sheet-of-paper icons with the letter A
pictured on them. The picture of the sheet is an indication of its setting.
3. Click the Margins tab.
4. Click the Top margin setting and change the setting to 0.250.
5. Click the Bottom margin setting and change the setting to 0.250.
6. Click the Left margin setting and change the setting to 0.250.
7. Click the Right margin setting and change the setting to 0.250.
Some printers may not allow margins as small as .250 for all four settings. If you
receive a warning, you will need to use a different value.
8. Click OK to close the Page Setup dialog box.
Chapter 8 ¦ Understanding and Creating Access Reports 195

Access displays your reports in Print Preview view by using the driver of the active printer. If you
don™t have a good-quality laser or inkjet printer available for printing, install the driver for one
anyway so that you can view any graphics that you create (and see the report in a high-resolu-
tion display). Later, you can print to your inkjet or other available printer and get the actual hard
copy in the best resolution your printer offers.

After you define your page layout in the Page Setup dialog box, you need to define the size
of your report (which is not necessarily the same as the page definition).
To define the report size, place the mouse pointer on the right-most edge of the report (where
the white page meets the gray background). The pointer changes to a double-headed arrow.
Drag the pointer to change the width of the report. As you drag the edge, a vertical line appears
in the ruler to let you know the exact width if you release the mouse at that point. Be careful
not to exceed the width of the page you defined in the Page Setup dialog box.
When you position the mouse pointer at the bottom of the report, it changes to a double-
headed arrow similar to the one for changing width. Dragging will change the height of the
page footer section or other specified bottom section, not the height of the whole page.
(Predefining a page length directly in the report section doesn™t really make sense because
the detail section will vary in length, based on your groupings.) Remember that the Report
Design view shows only a representation of the various report sections, not the actual report.
To set the right border for the Product Display report to 7½ inches, follow these steps:
1. Click the right-most edge of the report body (where the white page meets the gray
background). The mouse pointer changes to a double-headed arrow.
2. Drag the edge to the 7½-inch mark.
3. Release the mouse button.

You can also change the Width property in the property window for the report.

When you run your report and every other page is blank, it is a sign that the width of your report
Tip exceeds the width of your page. To fix this, decrease your left and right margin size or your
report width. Sometimes, when you move controls around, you accidentally make the report
width larger than your original design. For example, in a portrait report, if your left margin +
report width + right margin is greater than 8½ , you will see blank pages.

Placing fields on the report
Access takes full advantage of Windows™ drag-and-drop capabilities. The method for
placing fields on a report is no exception. As with forms, when you place a field on a
report, it is no longer called a field; it is called a control. A control has a control source (a
specific table field) that it is bound to, so the terms control and field are used
interchangeably in this chapter.
Part I ¦ Getting Functional with Office 2003

To place controls on your report:
1. Display the Field List window by clicking the Field List toolbar button.
2. Click the desired Toolbox control to determine the type of control that will be
created if they are to be different from the default control types for the fields.
3. Select each of the fields that you want on your report and then drag them to the
Report Design window.

Displaying the field list
To display the Field List window, click the Field List button on the toolbar. A small
window with a list of all the fields from the underlying query appears. This window is
called a modeless dialog box because it remains onscreen even while you continue with
other work in Access. The Field List window can be resized and moved around the screen.
The enlarged Field List window is illustrated in Figure 8-21, showing all the fields in the
tblProducts table.

Figure 8-21: Dragging fields to the Design window.


. 5
( 14)