<< . .

. 21
( : 51)



. . >>

By offsetting the first control in the Detail section slightly to the right of the start of
the control in the Group Header section, you show the hierarchy of the data
presented in the report. It now will show that each group of products is for the
category listed in the group header.
4. Lengthen the chrDescription control so that it approaches the chrProduct ID
control.
When you are done, the report design should look like the one shown in Figure 8-27.
Figure 8-27 shows this property window and the completed report design.




Figure 8-27: Completing the Group Header section and setting a Page Break.


Adding page breaks
Access enables you to add page breaks based on group breaks; you can also insert forced
breaks within sections, except in page header and footer sections.
In some report designs, it™s best to have each new group begin on a different page. You can
achieve this effect easily by using the Force New Page property of a group section, which
enables you to force a page break every time the group value changes.
Part I ¦ Getting Functional with Office 2003
216

The four Force New Page property settings are listed below:
¦ None. No forced page break (the default).
¦ Before Section. Starts printing the current section at the top of a new page every
time there is a new group.
¦ After Section. Starts printing the next section at the top of a new page every time
there is a new group.
¦ Before & After. Combines the effects of Before Section and After Section.
To create the report you want, you will force a page break before the chrCategory group by
using the Force New Page property in the chrCategory header. To change the Force New
Page property on the basis of groupings, follow these steps:
1. Click anywhere in the chrCategory header.
2. Display the Property window.
3. Select the Force New Page property.
4. Click the drop-down list arrow on the right side of the edit box.
5. Select Before Section from the drop-down list box.

Tip Alternatively, you can create a Group footer and set its Force New Page property to After
Section.

Sometimes, you don™t want to force a page break on the basis of a grouping, but you
still want to force a page break. For example, you may want to split a report title across
several pages. The solution is to use the Page Break tool from the Toolbox; just follow
these steps:
1. Display the Toolbox.
2. Click the Page Break tool.
3. Click in the section where you want the page break to occur.

Be careful not to split the data in a control. Place page breaks above or below controls; do not
Note
overlap them.


Making the Report Presentation Quality
As you near completion of testing your report design, you should also test the printing of
your report. Figure 8-28 shows a print preview of the first page of the Product Display
report. You can see six records displayed. There are a number of things still to do to
complete the report.
Chapter 8 ¦ Understanding and Creating Access Reports 217

Obviously, the Picture needs to be changed so that it displays all of each car. Currently, the
default Clip view is set. You will need to change that. But that is not the major problem. The
report is very boring, plain, and not something you want to give to anyone else. If your goal
is to just look at the data, this report is done. However, you need to do more before you are
really done.
Although the report has good data that is well organized, it is not of professional quality. To
make a report more visually appealing, you generally add some lines and rectangles,
possibly some special effects such as shadows or sunken areas if you have a background on
the report. You want to make sure sections have distinct areas separate from each other using
lines or color. Make sure controls aren™t touching each other (because text may eventually
touch if a value is long enough). Make sure text is aligned with other text above or below
and to the right or left.
In Figure 8-28, you can see some opportunities for professionalism.




Figure 8-28: Print previewing the data.
Part I ¦ Getting Functional with Office 2003
218


Adjusting the Page Header
In the Page Header are several large labels. They are too far apart. The column headers
are too small and just hanging there. They could be underlined and made one font size
larger. Access generally creates controls with 8 point fonts. These are great for screens but
awful for people to view in a hard copy report. When you create a Word document, the
default font size is 10 point. Most people change their default font size to 12 point
because it is more easily readable. You should look at your hard copy report and decide if
you need to issue magnifying glasses to people over 40. If so, you might want to enlarge
some of your fonts.
Column headers should also be underlined and the entire Page Header should be separated
from the Detail section by a line.
If you wanted to add some color to your report, you could make the report name a different
color. Be careful not to use too many colors unless you have a specific theme in mind. Most
serious business reports use one or two colors, and rarely more than three with the exception
of graphs and charts.
Figure 8-29 shows these changes. The Product Display label has been changed to a
reverse video blue background color with white foreground text. This is done by first
selecting the control and then selecting Blue for the background. They have also been
placed under each other and left aligned. The rectangle around each of the controls was
also properly sized by double-clicking on the controls lower-right corner (or by selecting
Format_Size_To Fit).
The column labels have been changed to 11 point text, bolded, and underlined. They were
also moved to be above the controls for which they are the column headers.
The next step is to add a nice thick line separating the Page Header section from the
chrCategory Group Header section. To draw this line, follow the steps below:
1. Select the Line tool in the toolbox.
2. Start the cursor near the far left side of the Page Header, just to the right and above
of the 1 inch mark on the vertical toolbar, as shown in Figure 8-29.
3. Hold down the Shift key and then hold the left mouse button down and drag the
mouse across the Page Header, releasing it just to the left of the 7 ½ inch mark.
The Shift key is held down in order to draw a perfectly horizontal line.
4. Select the line and select the number 2 pt line thickness from the line thickness icon
on the toolbar, or select the 2 pt Border Width property from the line™s Property
window.
The line thickness icon should be next to the Border icon on the formatting toolbar.
Chapter 8 ¦ Understanding and Creating Access Reports 219




Figure 8-29: Adjusting controls in the Page Header.


Creating an expression in the Group Header
Figure 8-29 also shows that the chrCategory field has been replaced by an expression. If you
just place the value of the category in the Group Header section, it looks out of place and
may not be readily identifiable. Most data values should have some type of labels to identify
what they are.
The expression =”Category: “ & [chrCategory] will display the text
Category: followed by a space and then followed by the data value of the chrCategory
field. The & symbol (known as the concatenation symbol) joins a string to a data field.
Make sure you leave a space after the colon or the value will not be separated from the label.
The text control has been bolded, underlined, and the font point size increased as well.
There is one more very important task to complete. If you simply changed the chrCategory
text box to the expression and displayed the report, you would have seen an error in the Group
Header where the category expression would be. You must rename the control to something
other than the original name of the data field. The original control name was chrCategory and
that was also the control name. Under standard naming conventions, the control should have
been renamed txtCategory, but this may not have been done. When you create an expression
using the original text box control and you use the field name in the control, you will cause an
error. You cannot name a control the same name as any data field used within the expression
itself. This is a limitation of Access. See the Caution below for more information.

When you create a bound control, it often uses the name of the data field as the control name.
If you then change the control to an expression using the data field in the expression without
Caution
changing the name of your control, you will get a #Name or #Error when you display the control
on a form or report. You must rename the control to something other than the original field name.
Part I ¦ Getting Functional with Office 2003
220

Follow the steps below to complete the expression and rename the control:
1. Select the chrCategory control in the chrCategory Group Header section.
2. Display the Property window for the control.
3. Change the Control Source property to =”Category: “ & [chrCategory].
4. Change the Name property to txtCategoryDisplay.

Changing the picture properties and the Detail section
The Detail section is in fairly good shape. Make sure the Description control is slightly
indented from the Category expression in the Group Header. A label should be created, as
shown in Figure 8-30, which identifies the values in the Cost, Retail Price, and Sale Price
controls.
A line is also good to add to this Detail section to separate one record from another. This is
often done when there are multiple lines of a record displayed.
The next step is to add a nice thick line separating each record. Because you don™t want two
lines at the bottom of each page (you™ll be adding a line to the Page Footer next), you will
put this line at the top of the Detail section. To draw this line, follow the steps below:
1. Select the Line tool in the toolbox.
2. Start the cursor near the far left side of the Detail section, just to the right and above
the 1/8 inch mark on the vertical toolbar, as shown in Figure 8-30.
You may have to first move all of the controls down in the Detail section to do this.
3. Hold down the Shift key and then hold the left mouse button down and drag the
mouse across the Page Header, releasing it just to the left of the 7 ½ inch mark.
The Shift key is held down in order to draw a perfectly horizontal line.
4. Select the line and select the number 2 pt line thickness from the line thickness icon
on the toolbar or select the 2 pt Border Width property from the line™s Property
window.
Normally, numeric fields are right aligned. Because they are next to each other horizontally
and not above each other vertically, they can be left aligned. Though the repeating groups of
records are above each other, they are separated by a wide space and left alignment is okay
One task to complete is to change the Picture control to make the picture fit within the
control and to add a shadow to dress up the picture and give it some depth. Follow the steps
below to complete these tasks:
1. Select the olePicture control in the Detail section.
2. Display the Property window for the control.
3. Change the Size Mode property to Stretch.
4. Select Shadowed from the Special Effect window.
Chapter 8 ¦ Understanding and Creating Access Reports 221


Creating a standard page footer
The Page Footer currently contains a page number control that you created earlier in this
chapter. A standard page footer is one that contains things you place at the bottom of all
your reports and that your users come to expect.
Although a Page n of m control is at the bottom, a date and time control would be nice as
well. Many times, you print off a copy of a report and then discover some bad data. You
correct the values, print off another copy, and discover you can™t tell them apart. Having a
print date and time solves this problem.
To create a date/time control, follow the steps below:
1. Select the TextBox control in the Toolbox.
2. Select the Page Footer section and create a text box control near the left edge.
A text box control should appear with an attached label.
3. Delete the attached label.
4. Display the property window for the control.
5. Enter =Now() into the text box™s Control Source property.
This displays the current date and time when the report is run. If you use the Date()
keyword, you would only get the current date and not the current time.
6. Select General Date from the control™s Format property.
7. Select Align Left text from the formatting toolbar for this control.
This control should have its text left aligned, but make sure the page number
control contains right-aligned text.
The last step is to move the controls down a little from the Page Footer section band and add
a line between the Page Header section band and these controls:
1. Select both the date and page number controls and move them down 1/8 inch.
2. While they are selected, press the Italic icon on the formatting toolbar.
An italicized page footer looks more professional.
3. Select the Line tool in the toolbox.
4. Start the cursor near the far-left side of the Page Footer, just to the right and above
the 1/8-inch mark on the vertical toolbar, as shown in Figure 8-30.
5. Hold down the Shift key and then hold the left mouse button down and drag the
mouse across the Page Header, releasing it just to the left of the 7 ½-inch mark.
The Shift key is held down in order to draw a perfectly horizontal line.
6. Select the line and select the number 2 pt line thickness from the line thickness
icon on the toolbar or select the 2 pt Border Width property from the line™s
Property window.
Part I ¦ Getting Functional with Office 2003
222

Your screen should look like the one shown in Figure 8-30. The Print Preview for
this report is shown in Figure 8-31.




Figure 8-30: Adjusting controls in the Detail and Page Footer sections.


If every even-numbered page is blank, you accidentally widened the report past the 8-inch
Caution mark. If you move a control to brush up against the right page-margin border or exceed it, the
right page margin increases automatically. When it is past the 8-inch mark, it can™t display the
entire page on one physical piece of paper. The blank page you get is actually the right side of
the preceding page. To correct this, make sure that all your controls are within the 8-inch right
margin; then drag the right page margin back to 8 inches.


Saving your report
After all the time you spent creating your report, you™ll want to save it. It is good practice to
save your reports frequently, starting as soon as you create them. This prevents the
frustration that can occur when you lose your work because of a power failure or human
error. Save the report as follows:
1. Select File_Save. If this is the first time you have saved the report, the Save As
dialog box appears.
2. Type a valid Access object name. For this example, type rptProductDisplayFinal.
3. Click OK.
Chapter 8 ¦ Understanding and Creating Access Reports 223

If you already saved your report, Access saves your file with no message about what it is up to.




Figure 8-31: Print Preview of the Final Products Summary Report.

¦ ¦ ¦
P A R T




II
Collaborating
and Integrating . . . .


with Microsoft In This Part


Office 2003 Chapter 9
Building Integrated
Documents

Chapter 10
Integrating Outlook
with Other Applications


T
Chapter 11
his part is comprised of chapters that enable users of one
Comments, Reviewing, and
particular Office 2003 application to more effectively
Editing Control in Word
collaborate and integrate their efforts with coworkers and/or other
applications.
Chapter 12
Sharing Excel Data with
Other Applications

Chapter 13
Team Collaboration
on a Draft PowerPoint
Presentation

Chapter 14
Integrating FrontPage with
Other Office Applications

Chapter 15
Exchanging Access Data
with Other Office
Applications

Chapter 16
Collaboration
on a Network

Chapter 17
Windows SharePoint
Services with Office System

. . . .
9
CHAPTER



Building
Integrated
Documents . . . .

In This Chapter

Inserting objects from
other applications

E ach Office application is so powerful in its own right that you
Working with
can usually find some way to make it do whatever you want
embedded objects
it to. Forcing Excel to print a letter, however, or trying to make a
Word table work like a spreadsheet isn™t very efficient. That™s
Working with linked
where linked and embedded objects come in: You can use them to
objects
create an Office document in one application that contains objects
you created in other applications. Not only that, you can configure
Other methods of
Office so that changes made to objects in their original
sharing data
applications are automatically reflected in the document in which
they all appear together.
Sharing data with XML
First, a couple of definitions:
¦ A linked object is one that appears in your Office
. . . .
document but isn™t really part of it: It™s stored somewhere
else. All that™s really included in your document is the
object™s name and location; when you display or print the
page that includes the linked object, Office fetches the
object from wherever it is and dutifully includes it. One
advantage of linking over embedding is that any changes
made to the object in the original program (e.g., Excel or
Word) will automatically be reflected in the Office
document in which it is included.
¦ An embedded object is created and edited with another
program, but all the data for it is contained within your
publication. Whereas a linked object has little effect on
the amount of disk space your publication takes up, an
embedded object may have a much greater effect.
Part II ¦ Collaborating and Integrating with Office 2003
228


Inserting Objects from Other Applications
There™s more than one way to insert an object created in another application into your current
Office document.

Copy and paste
One simple method to move an object from application to application is simply to copy and
paste it. For example, if you highlight a range of cells in an Excel spreadsheet, select
Edit_Copy, go to Word, and select Edit_Paste, the spreadsheet will be pasted into Word as a
Word table. The trouble with this is that you don™t actually have an Excel spreadsheet in the
Word document, which means you can™t manipulate the information in that object the way
you could before.

In Word, the Standard toolbar includes a button for creating an Excel spreadsheet. Click it and
Tip choose the number of rows and columns you want it to display, just as if you were adding a
Word table. (It™s really a full spreadsheet, by the way; if you decide later you need more rows
and columns, you can simply drag its corner or side handles to reveal more.)

Using Paste Special in Word
A better choice is to select Edit_Paste Special in Word. This opens the dialog box shown in
Figure 9-1. Choose the format in which you want to paste the object from the clipboard, and
then click OK. By default, Paste Special creates an embedded object, but you can make it a
linked object by choosing Paste Link.




Figure 9-1: The Paste Special dialog box lets you choose how an object created in
another application is pasted into the current one.
Chapter 9 ¦ Building Integrated Documents 229


Choosing a paste method

<< . .

. 21
( : 51)



. . >>