Developing Effective Reports
Chapter 5
Chapter 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 Access 2010 2
Tools Covered In This Chapter
• Charts• Conditional formatting• Crosstab Query Wizard• Label Wizard• Page breaks• Queries• Report tool• Report Wizard• Sorting and Grouping• Subreports
Succeeding in Business with Microsoft Access 2010 3
Level 1 Objectives:Creating Simple Reports and Labels
• Create and modify basic reports• Improve the design and layout of report
information content • Create labels using Label Wizard
Succeeding in Business with Microsoft Access 2010 4
Understanding Reports
• Report – Presents information from one or more database tables – Printed format– Provides 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 Access 2010 5
Understanding 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 Access 2010 6
Comparing Forms and Reports
Succeeding in Business with Microsoft Access 2010 7
Choosing 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 Access 2010 8
Examples of Access Reports
Succeeding in Business with Microsoft Access 2010 9
Types of Reports Available in Access
Succeeding in Business with Microsoft Access 2010 10
Types of Reports Available in Access (continued)
Succeeding in Business with Microsoft Access 2010 11
Planning 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 Access 2010 12
Creating 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 Access 2010 13
Creating 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, click the Report button in the Reports group. 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 Access 2010 14
Creating a Report Using the Report Tool
Succeeding in Business with Microsoft Access 2010 15
Creating 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 Access 2010 16
Creating a Report Using the Report Wizard (continued)
• Pages– Fields– Grouping– Sorting– Layout and orientation
Succeeding in Business with Microsoft Access 2010 17
Modifying 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 Layout and Design view – Switch to Print Preview to see effects of changes
Succeeding in Business with Microsoft Access 2010 18
Report Controls
Succeeding in Business with Microsoft Access 2010 19
Four Report Views
Succeeding in Business with Microsoft Access 2010 20
Modifying 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 Access 2010 21
Modifying 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 Access 2010 22
Modifying 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 Access 2010 23
Modifying 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 Access 2010 24
Common Section Properties
Succeeding in Business with Microsoft Access 2010 25
Common Report Properties
Succeeding in Business with Microsoft Access 2010 26
Improving the Design and Layout of Report Information Content
• 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 Logo button
Succeeding in Business with Microsoft Access 2010 27
Creating a Custom Style for Reports
• Can use theme as in forms– Add theme colors – Add font colors– Access will apply to the proper section– When Theme changes, applied to all objects using
the theme.
Succeeding in Business with Microsoft Access 2010 28
Creating 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 Access 2010 29
Using the Report Wizard to Created a Grouped Report
Succeeding in Business with Microsoft Access 2010 30
Creating 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 Access 2010 31
Creating 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 Access 2010 32
Level 1 Summary
• Report– Printed version of data
• Create using– Report tools– Report Wizard
• Use design view to customize appearance and data
• Save design as Theme
Succeeding in Business with Microsoft Access 2010 33
Level 2 Objectives: Developing Management Reports to Support Decision Making
• Create a custom report• Apply grouping to report data• Improve the design and layout of grouped
reports
Succeeding in Business with Microsoft Access 2010 34
Creating 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 Access 2010 35
Creating 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 Access 2010 36
Creating 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 Access 2010 37
Adding 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 Group & Sort button• Each report can have up to 10 sort fields– Any sort field can also be grouping field
Succeeding in Business with Microsoft Access 2010 38
Group, Sort, and Total Pane
Succeeding in Business with Microsoft Access 2010 39
Improving the Design and Layout of a Grouped Report
• 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 Access 2010 40
Improving 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 Access 2010 41
Grouping 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 Access 2010 42
Grouping on Date and Time (continued)
• Last function – Returns value for last row encountered for each
group
Succeeding in Business with Microsoft Access 2010 43
Changing 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
Succeeding in Business with Microsoft Access 2010 44
Forcing 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 Access 2010 45
Level 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 Access 2010 46
Level 3 Objectives:Designing Reports for Data Analysis
• Use advanced report design• Develop reports with subreports• Add a chart to a report
Succeeding in Business with Microsoft Access 2010 47
Creating Advanced Reports
• 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– Create a report title, if desired– Drag fields to detail section from field list– Add grouping and/or sorting
Succeeding in Business with Microsoft Access 2010 48
Exporting Access Data to Microsoft Excel
• Select the query you want to export• Click the External Data tab• Click the desired button in the Export group• Select the destination• Open the query in Excel
Succeeding in Business with Microsoft Access 2010 49
Beyond 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 Access 2010 50
Advanced Label Formatting
• Create query with the needed fields• Use Label Wizard to get started• Modify label layout created by Label Wizard
Succeeding in Business with Microsoft Access 2010 51
Modifying Labels in Design View
• Use properties of controls to modify label precisely
• Use color to highlight items of interest• Use properties in the Property sheets for the
label and its controls
Succeeding in Business with Microsoft Access 2010 52
Including Additional Data for Analysis
• Subreport– Provides information similar to subform
• Apply conditional formatting to report – Display some information in certain color• Specify conditions for color changes
Succeeding in Business with Microsoft Access 2010 53
Adding 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 Access 2010 54
Conditional 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 Access 2010 55
Setting Conditional Formatting for the Calculated Percent Field
Succeeding in Business with Microsoft Access 2010 56
Setting Conditional Formatting for the Calculated Percent Field
Succeeding in Business with Microsoft Access 2010 57
Adding a Chart to a Report
• Create a report or open an existing report– Switch to Design View
• Increase the size of the report section where you want to place chart
• Click the Chart button in the Controls Group• Hold mouse button and draw from upper left to
lower right an outline for the chart• Chart Wizard select the table or query for the
chart and the fields to be usedSucceeding in Business with Microsoft Access 2010 58
Adding a Chart to a Report, Cont.
• Choose the chart type in the Wizard• Drag and drop the fields where you want them
to appear in the chart• Select report fields and chart fields to change
from record to record• Enter a title for the chart, then click Finish
Succeeding in Business with Microsoft Access 2010 59
Level 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 Access 2010 60
Chapter 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 Access 2010 61