ch05 access

59
Developing Effective Reports 1 Chapter 5 “Nothing succeeds like reports of success.” —Sue Sanders

Upload: d

Post on 14-Jan-2015

2.108 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Ch05 Access

Developing Effective Reports

1

Chapter 5

“Nothing succeeds like reports of success.”—Sue Sanders

Page 2: Ch05 Access

XPXPChapter Introduction• Reports

– Reflect the information in the database– Summarize business activities– Use reports to format data in an attractive and

informative layout for printing– Often based on data in multiple tables

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 2

Page 3: Ch05 Access

XPXPTools Covered In This Chapter• Conditional formatting• Label Wizard• Page breaks• Queries• Report tool• Report Wizard• Sorting and Grouping• Subreports

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 3

Page 4: Ch05 Access

XPXPLevel 1 Objectives:Creating Simple Reports and Labels• Create and modify basic reports• Improve information content of reports

– Sorting and summarizing• Create labels using Label Wizard

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 4

Page 5: Ch05 Access

XPXPUnderstanding Reports• Report

– Presents information from one or more database tables

– Printed format– Provide most options and advantages for printing

database content• Organize and format information to create professional

presentation• Include numeric and textual data• Maintain flexibility when displaying summary information

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 5

Page 6: Ch05 Access

XPXPUnderstanding Reports (continued)• Accomplish goals with reports

– Create printed copy of information used regularly– Distribute information to others– Customize organization and appearance of printed

information – Group or summarize information for

• Reporting to others • Calculating running totals• Group totals• Grand totals• Percentages of totals

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 6

Page 7: Ch05 Access

XPXPComparing Forms and Reports

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 7

Page 8: Ch05 Access

XPXPChoosing the Appropriate Type of Report• Determine report purpose and audience

– Before developing

• Report types– Detailed– Grouped– Summary– Mailing labels– Multiple-column

• Types of reports can contain other reports– Called subreports

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 8

Page 9: Ch05 Access

XPXPExamples of Access Reports

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 9

Page 10: Ch05 Access

XPXPTypes of Reports Available in Access

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 10

Page 11: Ch05 Access

XPXPTypes of Reports Available in Access (continued)

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 11

Page 12: Ch05 Access

XPXPPlanning Basic Reports• Start by creating reports for various functions

within pharmacy – Managers of areas can review reports – Comment on usefulness and appearance

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 12

Page 13: Ch05 Access

XPXPCreating and Modifying Basic Reports• Report tool

– Create report that displays all fields and records in single table or query

• Report Wizard– Guides you through steps of creating report – Based on one or more tables or queries– Asks questions about

• Record sources • Fields• Layout• Format

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 13

Page 14: Ch05 Access

XPXPCreating a Report Using the Report Tool• In the Navigation Pane, click the table on which

you want to base the report• Click the Create tab of the Ribbon and click the

Report tool. Access creates a report that includes all the fields from the record source

• Save the report• Naming reports

– Use rpt prefix– Choose meaningful name

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 14

Page 15: Ch05 Access

XPXPCreating a Report Using the Report Tool

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 15

Page 16: Ch05 Access

XPXPCreating a Report Using the Report Wizard• Provides quick way to select only fields you want

to display in report – Based on one or more tables or queries

• Select one of several layouts and styles for report• Create report with Report Wizard

– Customize report in design view• Provides options for selecting fields

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 16

Page 17: Ch05 Access

XPXPCreating a Report Using the Report Wizard (continued)• Pages

– Fields– Grouping– Sorting– Layout and orientation– Style

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 17

Page 18: Ch05 Access

XPXPModifying a Report in Design View• Can also create reports from scratch in Design

view• Control

– Small object such as text box – Displays data or line to separate one record from

another• Modify report in Design view

– Switch to Print Preview to see effects of changes

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 18

Page 19: Ch05 Access

XPXPReport Controls

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 19

Page 20: Ch05 Access

XPXPFour Report Views

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 20

Page 21: Ch05 Access

XPXPModifying a Report in Design View (continued)• Report sections:

– Report header– Page header– Group header– Detail– Group footer– Page footer– Report footer

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 21

Page 22: Ch05 Access

XPXPModifying a Report in Design View (continued)• View property sheet for section

– Double-click section bar• Report caption

– Name of report in title bar• Report design checklist:

– Is report in format chosen for all reports?– Does title label caption need to be modified?– Have I changed report caption?– Can I read complete column headings or are they

truncated?Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 22

Page 23: Ch05 Access

XPXPModifying a Report in Design View (continued)• Report design checklist:

– Does all data in detail area appear or is some truncated?

– Is report so wide that it should use landscape orientation?

– Is vertical spacing too spread out or too close?– If report has many numbers does it use gridlines to

make reading it easier?– Do any extra items on report detract from its

appearance?

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 23

Page 24: Ch05 Access

XPXPModifying a Report in Design View (continued)• Report design checklist:

– Do any errors or blank pages appear when report printed?

– Would data have more information content if grouped?

– Would summary data add to information content of report?

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 24

Page 25: Ch05 Access

XPXPCommon Section Properties

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 25

Page 26: Ch05 Access

XPXPCommon Report Properties

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 26

Page 27: Ch05 Access

XPXPMoving Detail Fields to Multiple Lines on a Report• Increase length of detail section to make room

for second row of text by– Dragging page footer section bar down

• Move fields• Add logos or other graphics

– Using image button

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 27

Page 28: Ch05 Access

XPXPCreating a Custom Style for Reports• Click AutoFormat button on Arrange tab

– Create custom AutoFormat based on report

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 28

Page 29: Ch05 Access

XPXPCreating a Grouped Report Using a Single Table• Grouped report

– Groups records based on values in one or more fields– Makes report more informative– Calculate totals and other values for each group

• Create using Report Wizard– Only allows four grouping levels

• Create using Design view– Up to 10 grouping levels allowed

• Group level determines how groups nested

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 29

Page 30: Ch05 Access

XPXPUsing the Report Wizard to Created a Grouped Report

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 30

Page 31: Ch05 Access

XPXPCreating Labels Using the Label Wizard• Store name and address information in Access

database– Create simple report formatted to look like mailing

label– Report extracts address data from table or query

• Organizes it to print label for each address in record source

• Use Label Wizard– Specify record source for mailing label report– Select type of label

• Customize mailing labels using design viewSucceeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 31

Page 32: Ch05 Access

XPXPCreating Labels Using the Label Wizard (continued)• Build prototype of label

– By selecting necessary fields one at a time– Press enter key to move to next line

• Specify sort order for labels

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 32

Page 33: Ch05 Access

XPXPLevel 1 Summary• Report

– Printed version of data• Create using

– Report tools– Report Wizard

• Use design view to customize appearance and data

• Save design as AutoFormat

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 33

Page 34: Ch05 Access

XPXPLevel 2 Objectives: Developing Management Reports to Support Decision Making• Create a custom report• Add calculations to a report• Look at design view and properties

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 34

Page 35: Ch05 Access

XPXPCreating Custom Reports• Custom reports

– Require data from more than one table – Have calculated fields – Use summary statistics– Require parameter input at time report run

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 35

Page 36: Ch05 Access

XPXPCreating a Report Using Fields from Multiple Tables• Limit records included in report or use parameter

values – Base report on query

• Resolving error messages in mailing labels– May see error message when previewing or printing

mailing labels– Before modifying column widths

• Check to see if data in labels all printing

– Modify column widths to eliminate errors

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 36

Page 37: Ch05 Access

XPXPCreating a Report Using Fields from Multiple Tables (continued)• Parameter queries allow user input

– Dialog box requesting information to be used as criteria for retrieving records

• Enter parameter [Prompt?]

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 37

Page 38: Ch05 Access

XPXPAdding or Modifying Grouping Levels to a Report• Add grouping level after creating original report• Sort fields can also serve as grouping fields• Group header

– Includes name of group• Group footer

– Includes count or subtotal for records in group• Use sorting and grouping button• Each report can have up to 10 sort fields

– Any sort field can also be grouping field

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 38

Page 39: Ch05 Access

XPXPGroup, Sort, and Total Pane

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 39

Page 40: Ch05 Access

XPXPImproving the Information Content of Grouped Reports• Group header

– Area on report used to indicate start of new group– Text or controls located in group header shown once

for group• Group footer section

– Shown only once at end of any group detail– Most often used to contain summary data such as

subtotals for data in group

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 40

Page 41: Ch05 Access

XPXPImproving the Information Content of Grouped Reports (continued)• Tabular reports that have large amounts of data

– Often contain more information content if report uses grouping

• Organize data into smaller segments • Easier to comprehend

• Calculated fields – General format

• Use equal sign followed by calculation

– Most developers recommend creating calculation in query • Use query as basis for report

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 41

Page 42: Ch05 Access

XPXPGrouping on Date and Time• Accounting reports

– Usually prepared for monthly quarterly and annual time periods

• Report Wizard has built-in grouping options for date/time fields– Use same date field for multiple time periods

• Create query that shows only last refill for any customer within household– Use totals button

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 42

Page 43: Ch05 Access

XPXPCreating a Sales Report

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 43

Page 44: Ch05 Access

XPXPGrouping on Date and Time (continued)• Last function

– Returns value for last row encountered for each group

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 44

Page 45: Ch05 Access

XPXPChanging the Record Source and Adding Fields• Report designers often need to change source of data

for report after it is created– Change record source property in report’s property sheet– Copy object such as query form, label, or macro

• Modify it for another use

– May need to remove fields not included in new record source

• Add field from underlying table or query to report – Drag field name from field list

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 45

Page 46: Ch05 Access

XPXPForcing a Page Break After Each Group• Print data for one person only

– Insert page break control to force page break– Use page break button– Insert page break in group footer

• Keep together setting in Properties dialog box – Keep heading and at least part of detail together

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 46

Page 47: Ch05 Access

XPXPLevel 2 Summary• Custom reports• Grouping organizes information

– Group on any sort field– Group header/footer

• Modify report in design view– Change data source– Add fields

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 47

Page 48: Ch05 Access

XPXPLevel 3 Objectives:Designing Reports for Data Analysis• Define conditional formatting rules in a report• Develop reports with subreports• Develop graphs

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 48

Page 49: Ch05 Access

XPXPCreating Advanced Reports in Design View• Create report in Design view

– Click Create tab on the Ribbon– Click the Report Design button– Specify Data Source

• Can also specify later

– Add report header and footer if desired– Drag fields to detail section from field list– Add grouping and/or sorting

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 49

Page 50: Ch05 Access

XPXPExporting Access Data to Microsoft Excel• Select the query you want to export• Clic kthe External Data tab• Click the desired button in the Export group• Select the destination• Open the query in Excel

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 50

Page 51: Ch05 Access

XPXPBeyond Calculated Fields• To use summary options from Report Wizard

– Must have numeric field– Base report on query that includes numeric field

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 51

Page 52: Ch05 Access

XPXPAdvanced Label Formatting• Modify label layout created by Label Wizard

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 52

Page 53: Ch05 Access

XPXPModifying Labels in Design View• Use properties of controls to modify label

precisely

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 53

Page 54: Ch05 Access

XPXPIncluding Additional Data for Analysis• Subreport

– Provides information similar to subform• Apply conditional formatting to report

– Display some information in certain color

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 54

Page 55: Ch05 Access

XPXPAdding a Subreport to a Report• Access supports grouping

– Arrange data in hierarchical way by nesting groups• Subreports or subforms in report

– Including charts or unrelated data• Create report to use as subreport first

– Add it to main report in Design view

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 55

Page 56: Ch05 Access

XPXPConditional Formatting for Report Values• Conditional formatting

– Add formatting features such as color bold or larger fonts

– Based on values in report– Specify up to three conditions for field

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 56

Page 57: Ch05 Access

XPXPSetting Conditional Formatting for the Calculated Percent Field

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 57

Page 58: Ch05 Access

XPXPLevel 3 Summary• Create report in design view• Insert components into report

– Chart– Subreport– Subform

• Export to excel– Crosstab query

• Apply conditional formatting

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 58

Page 59: Ch05 Access

XPXPChapter Summary• Report

– Printed version of data

• Use Design view to customize appearance and data• Grouping organizes information• Insert components into report

– Chart– Subreport– Subform

• Export to Excel

Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 59