Access 2000
Access 2000
/HVVRQ
([HUFLVHV
5HSRUWV
/HVVRQ
:RUNLQJZLWK5HSRUWV
Exercise
Skills Covered:
5HSRUWEDVLFV&UHDWHUHSRUWVZLWK$XWR5HSRUW
3UHYLHZDUHSRUW6DYHDUHSRUW
2QWKH-RE
Reports give you much more flexibility in producing output than simply printing tables and queries. You can
print records in a tabular format that looks like a datasheet but with more attractive fonts, and you can print
records one below the other in a columnar format.
After seeing your print-outs of queries and tables, the owner and other employees of the bike shop have
been asking if you could make the print-outs more readable, and in some cases if you could add totals to
the details. You realize it is time to learn about reports.
7HUPV
Report A way to structure your data for printing
with format enhancements.
Tabular report A report in which each record is a
row and each column is a field.
Group A way of organizing a report so that similar
data appears in the same area of the report;
totals or counts are often used to show summary
statistics for the grouped data.
1RWHV
5HSRUW7\SHV
6WDUW5HSRUW&UHDWLRQ
Choose table or
query for source.
Choose procedure
to create report.
&UHDWH5HSRUWVZLWK$XWR5HSRUW
5HSRUW3UHYLHZ
Design
view
One-page Multiview
page view
Toggle Two-page
zoom
view
Zoom
Database
Window
Close
Office
Links
Help
New
Object
6DYH5HSRUWV
3URFHGXUHV
Create New Report
Using AutoReport
3. Click Report.........................
4. Choose AutoReport:
Columnar.
OR
Open a Report
1. Click Reports button
in
Database window.
2. Select report ......................
3. Click Design................ \+
to view report in Design view.
OR
([HUFLVH'LUHFWLRQV
1. Start Access, if necessary.
2. Open PAC01.
3. Open qryMailing.
4. Create a tabular AutoReport.
2Q<RXU2ZQ
1. Start Access and open OPAC01, a
database that contains names and addresses
in tables, forms, and queries.
2. Open the Addresses table.
3. Create a Columnar AutoReport.
4. Save the report as ColumnNames.
Exercise
Skills Covered:
8VH'HVLJQYLHZ
:RUNZLWKUHSRUWVHFWLRQV:RUNZLWKFRQWUROV
2QWKH-RE
While the AutoReport option may produce an acceptable report, you will often find that you need to edit a report
to change its title, enhance its appearance, and reposition fields to make it more readable and pleasing to the
eye. Access provides a number of ways to enhance a reports appearance and change its content.
You are not satisfied with the columnar report produced by the AutoReport option and want to change its
title and reposition its fields. You need to learn about Report Design view.
7HUPV
Design view The editing screen in which you can
change the way a report looks.
1RWHV
$ERXW'HVLJQ9LHZ
Preview button
$ERXW&RQWUROV
Command buttons
Images
Formulas or expressions in text boxes
Borders and lines
Labels
$ERXW5HSRUW6HFWLRQV
Report Header
Page Header
Detail
Page Footer
Expression
in text box
Fields in
text boxes
Report Footer
(empty)
&KDQJH6HFWLRQ6L]H
8VH'HVLJQ9LHZ
Toolbox button
Object button
Field List button
6HW&RQWURO3URSHUWLHV
&KDQJH&RQWURO6L]H
Rulers
Selected control
Field list
Toolbox
6HOHFW&RQWUROV
Width
0RYH&RQWUROV
'HOHWH&RQWUROV
(GLWD/DEHO
(QKDQFHD&RQWURO
Formatting toolbar
Align left
Object selected
Font size
Font name
Italic
Bold
Font/Fore color
Line/Border
Align right
width
Line/Border
Center
color
Background
Underline
color
Special Effect
3URFHGXUHV
Go to Design View
From Print Preview:
1. Click View ....................\+
2. Click Design View ...............
From Database Window:
1. Select report name.
2. Click Design ................\+
1. Click control.
2. Hold down Shift and click
additional controls.
All the following steps are done
with control(s) selected.
Edit a Label
1. Click in selected label to
position insertion point.
2. Press Delete.
OR
Press Backspace.
OR
To Tallest .......................
To Shortest....................
Select Controls
To Fit. .............................
Delete Controls
To Widest.......................
To Narrowest.................
Move Controls
Drag selected control with
hand mouse pointer.
OR
Enhance a Control
Click one of the Formatting
toolbar buttons.
OR
3. Click Align...........................
4. Choose one:
Left. ...............................
Right ..............................
Top ................................
Bottom...........................
([HUFLVH'LUHFWLRQV
Open a Report and Change the Title
1. Start Access, if necessary.
2.
3.
4.
5.
6.
Open PAC02.
Open rptMailTablular.
Switch to Design view.
Select the title in the Report Header section.
Edit the title to display on two lines as
shown below:
Breaking Away Bicycle Shop
Mailing List -- By ZIP Code
9Use Ctrl+Enter to create the line break after Shop.
2Q<RXU2ZQ
1. Start Access and open OPAC02.
2. Open the rptMailTabular2.
3. Save the report as rptMailTabular3.
4. Resize the LastName field to accommodate
the longest entry in the field.
9You need to resize the field, check the results, then
resize it again as necessary until you are sure it
accommodates the longest last name. Be sure to
check both pages of the report in Preview.
Exercise
Skills Covered:
&UHDWHUHSRUWVZLWK5HSRUW:L]DUG
2QWKH-RE
The Report Wizard gives you flexibility in creating a report by letting you choose which fields to include. It also
allows you to group data and provide summary statistics for each group and for the entire report.
Your colleagues at the bike shop want a report that summarizes recent orders by shipping name. You will
use the Report Wizard to create a report showing the information they want.
7HUPV
Report Wizard A series of dialog boxes that guides
you through the creation of a customized report.
1RWHV
&UHDWH5HSRUWVZLWK5HSRUW:L]DUG
Choose one
field at a time.
the Grouping
Intervals dialog box.
Add formulas to
grouping sections.
to look
3URFHGXUHV
Create New Report Using
Report Wizard
1. Open the table or query on
which you will base your report.
2. Click the drop-down arrow on
the New Object button
.
3. Click Report.........................
to move field.
OR
Click
to move field.
OR
Click
fields.
to move all
([HUFLVH'LUHFWLRQV
Create a Report with the Report Wizard
1.
2.
3.
4.
2Q<RXU2ZQ
1. Start Access and open OPAC03.
Exercise
Skills Covered:
&KDQJHFRQWUROSURSHUWLHV+LGHGXSOLFDWHHQWULHV
2QWKH-RE
Sometimes using the Formatting toolbar, moving, and sizing a control arent enough to make all the
changes you want. In these cases you will have to make changes in the control properties. Examples
include changing the controls format, resizing a control to specific dimensions, hiding duplicate entries,
adding fields, adding labels, and using expressions to combine fields for display.
You want to refine the look of the Client Orders report created in the previous exercise. To do so, you
need to use the property sheet and other tools that let you change control properties.
7HUPV
Control property A characteristic of a control,
such as what it looks like or where it gets its data.
1RWHV
&KDQJH&RQWURO3URSHUWLHV
Property
sheet tabs
&KDQJH)RUPDW
+LGH'XSOLFDWH(QWULHV
&KDQJH7\SHRI&RQWURO
$GGD)LHOGWRWKH5HSRUW
$GGD/DEHOWRWKH5HSRUW
3URFHGXUHV
Change Report Properties
OR
to close.
([HUFLVH'LUHFWLRQV
9Throughout this exercise, switch between Design view
and Preview as necessary to review and refine changes.
ClientID
Pemp
InputDate
WebPage
Notes
Hide Duplicates
1. In Design view, display the property sheet for
the State field.
2. Change the Hide Duplicates property to Yes.
3. Switch to Preview to view the results.
4. Print one copy of the report.
5. Compare your results with the illustration on
the next page.
6. Save and close the report.
2Q<RXU2ZQ
1. Open OPAC04 or open your OPAC03,
which contains your version of
rptClientOrders.
2. Copy rptClientOrders and paste it as
rptClientOrders2.
3. Open rptClientOrders2 in Design view.
4. Select the ShipName field in the Detail section.
5. Display its property sheet.
6. Scroll down to the Border Style property.
7. Change it to Transparent.
9Transparent causes the border to disappear. If you
later want the border to return, you can select a
different option for this property.
8.
9.
10.
11.
Exercise
Skills Covered:
&UHDWHDUHSRUWIURPDTXHU\+LGHUHSRUWVHFWLRQVDQGFRQWUROV
6HWSDJHPDUJLQV*URXSFRQWUROKHDGHUVDQGIRRWHUV
$GGUHSRUWVWDWLVWLFV
2QWKH-RE
One of the benefits of a report over a table or query is that you can print both details and totals on one
report. You can also group data together so it is easier to compare and examine your information.
As the manager of the Breaking Away Bicycle Shop, you want to get totals for orders, count customers,
and find other information that will help you make decisions about what to order, how many people to
staff, and how much to ask for your next raise.
7HUPV
Group To collect similar data together in a report.
When the value of the group field changes, there
is usually a blank line and summary calculations
on numeric fields.
1RWHV
&UHDWHD5HSRUWIURPD4XHU\
+LGH5HSRUW6HFWLRQVDQG&RQWUROV
Detail Section
Page Footer
Grouping Footer Section
Report Footer
3DJH0DUJLQV
*URXS&RQWUROVDQG
+HDGHUVDQG)RRWHUV
Icon indicates
group field.
Group properties
for selected field
$GG5HSRUW6WDWLVWLFV
3URFHGXUHV
Change Query in a Report
Select a previously created
query as the source of the
new report on the New Report
dialog box.
OR
OR
to move field.
Click
2. Select additional field,
if necessary.
3. Set Priority, if necessary.
4. To select grouping
intervals, click
Grouping Options ...... \+
5. Click OK........................... m
([HUFLVH'LUHFWLRQV
Copy a Report and Add Summary Statistics
1. Start Access, if necessary.
2. Open PAC05.
3. In the Database window, copy
rptClientOrders and paste as
rptClientOrdersYear.
4. Open the report rptClientOrdersYear in
Design view.
9Select rptClientOrders in the Database window and
press Ctrl+C, Ctrl+V and type the new report name
(rptClientOrdersYear).
Hide a Section
1. Copy the report rptClientOrdersYear and
paste it as rptTotalOrders.
2. Open rptTotalOrders in Design view.
3. Change the second line of the report title to
Total Client Orders for 1999.
4. Hide the Detail section.
9Change the Visible property to No.
2Q<RXU2ZQ
1. Start Access and open OPAC05.
2. Use the Report Wizard to create a report from
the Uppercase query.
3. Include the last name, city, state, and ZIP
Code fields.
4. Group the records by city.
5. Sort the records by last name.
6. Title the report Last Name List.
Exercise
Skills Covered:
&UHDWHODEHOV8VH8QLWHG6WDWHV3RVWDO6HUYLFHODEHOVW\OH
2QWKH-RE
You can create mailing labels by creating a mail-merge document in Word, using an Access table or query
as the data source. If you are creating mail-merge letters, using Word to create both label and letters may
be the most efficient. You can, however, create mailing labels directly from Access, using the Label Wizard.
With Access, you can also create labels for such things as product information cards, notebook tabs, manila
folder tabs, video stickers, and other uses.
The Breaking Away Bicycle Shop wants to mail new catalogs to all its clients. You are going to produce
mailing labels to send them.
7HUPV
Label Wizard A series of dialog boxes that guides
you through the creation of labels.
1RWHV
$ERXW/DEHOV
8VHWKH/DEHO:L]DUG
3. Choose Label
Type.
4. Choose Product
(label dimensions).
8QLWHG6WDWHV3RVWDO6HUYLFH6W\OH
3URFHGXUHV
Mailing Labels
USPS Style
3. Click Report.........................
to move field.
OR
([HUFLVH'LUHFWLRQV
1. Start Access, if necessary.
2. Open PAC06.
3. From qryMailing, use the New Object button,
Report, Label Wizard.
4. On the first dialog box of the wizard, choose:
2Q<RXU2ZQ
1. Start Access and open OPAC06, a
database that contains names and addresses
in tables, forms, and queries.
2. Open the Addresses table.
3. Use the Label Wizard to create mailing labels
from the Addresses table. Use Avery 5160 as
the label.
Exercise
&ULWLFDO7KLQNLQJ
High-Tech loved the job you did on their database earlier (and you loved the Hawaiian consulting trip).
Theyve asked you to come back to add some reports to their database.
([HUFLVH'LUHFWLRQV
1. Start Access, if necessary.
2. Open PAC07.
3. Study the reports that Access created for you
with the wizard, especially the formulas in the
text boxes.
4. Use the Label Wizard to create mailing labels
for employees and name the report
rptEmployeeLabels.
9Open the Employees table, click the New Object button,
choose Report, and then select Label Wizard. Choose
Avery as the manufacturer, English as Unit of Measure,
Sheet Feed, and Product 5160.
rptEmployeeHoursandTime
rptEmployeeHoursbyEmployee (page 2)
rptProjectTotals