61
Succeeding in Business with Microsoft Access 2013 Developing Effective Reports

Ch05 cmpt110

Embed Size (px)

Citation preview

Page 1: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013

Developing Effective Reports

Page 2: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 2

Chapter Introduction

• Reports– Reflect the information in the database– Summarize business activities– Provide details about your data– Use reports to format data in an attractive and

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

Page 3: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 3

Tools Covered In This Chapter

• Conditional formatting• Label Wizard• Page breaks• Queries• Report button• Report Wizard• Sorting and Grouping• Subreports

Page 4: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 4

Level 1 Objectives:Creating Simple Reports and Labels

• Create and modify basic reports• Improve the information content of reports by

sorting and summarizing• Create labels using Label Wizard

Page 5: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 5

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

Page 6: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 6

Understanding Reports (cont'd.)

• 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

Page 7: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 7

Table 5.1: Comparing forms and reports

Page 8: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 8

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

Page 9: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 9

Table 5.2: Types of reports available in Access

Page 10: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 10

Table 5.2: Types of reports available in Access (cont’d.)

Page 11: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 11

Planning Basic Reports

• Start by creating reports for various functions within pharmacy – Managers of areas can review reports – Comment on usefulness and appearance

Page 12: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 12

Creating and Modifying Basic Reports

• Report button– 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

Page 13: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 13

Creating a Report Using the Report Button

• In the Navigation Pane, click the table on which you want to base the report

• Click the CREATE tab, 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

Page 14: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 14

Page 15: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 16: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 16

Creating a Report Using the Report Wizard (cont'd.)

• Pages– Fields– Grouping– Sorting– Layout and orientation

Page 17: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 17

Modifying a Report in Design View

• Can create reports from scratch in Design view• Control – Small object such as text box – Displays data or line to separate records

• Modify report in Layout and Design view – Switch to Print Preview to see effects of changes

Page 18: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 18

Page 19: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 19

Page 20: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 20

Modifying a Report in Design View (cont'd.)

• Report sections:– Report header– Page header– Group header– Detail– Group footer– Page footer– Report footer

Page 21: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 21

Modifying a Report in Design View (cont'd.)

• View property sheet for section – Double-click section bar

• Report caption– Name of report in title bar

• Report design checklist:– Is the same format applied to 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?

Page 22: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 22

Modifying a Report in Design View (cont'd.)

• 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?

Page 23: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 23

Modifying a Report in Design View (cont'd.)

• 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?

Page 24: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 24

Page 25: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 25

Page 26: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 26

Moving 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 Logo button on the DESIGN tab

Page 27: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 27

Applying Themes to Reports

• Can use themes in forms– Add theme colors – Add font colors– Access will apply to the proper section

Page 28: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 29: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 29

Page 30: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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 view

Page 31: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 31

Creating Labels Using the Label Wizard (cont'd.)

• 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

Page 32: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 32

Level 1 Summary

• Report– Printed version of data

• Create using– Report button– Report Wizard

• Use Design view to customize appearance and data

• Save design as Theme

Page 33: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 33

Level 2 Objectives: Developing Management Reports to Support Decision Making

• Create a custom report• Add calculations to a report• Look at Design view and properties

Page 34: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 35: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 36: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 36

Creating a Report Using Fields from Multiple Tables (cont'd.)

• Parameter queries allow user input– Dialog box requesting information to be used as

criteria for retrieving records• Enter parameter [Prompt?]

Page 37: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 37

Adding or Modifying Grouping Levels to a Report

• Add grouping level after creating original report• Sort fields can 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

Page 38: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 38

Page 39: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 39

Improving 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

Page 40: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 40

Improving the Information Content of Grouped Reports (cont'd.)

• Tabular reports that have large amounts of data – Can contain more information 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

Page 41: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 42: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 42

Grouping on Date and Time (cont'd.)

• Last function – Returns value for last row encountered for each

group

Page 43: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 44: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 44

Forcing a Page Break After Each Group

• Print data for one person only– Insert page break control to force page break– Use Insert Page Break button– Insert page break in group footer

• Keep Together setting in Properties Sheet– Keep heading and at least part of detail together

Page 45: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 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

Page 46: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 46

Level 3 Objectives:Designing Reports for Data Analysis

• Define conditional formatting rules in a report• Develop reports with subreports• Develop graphs

Page 47: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 47

Creating Advanced Reports in Design View

• Create report in Design view– Click Create tab on the Ribbon– Click Report Design button in the Reports Group– Click the Property Sheet button in the Tools group– Click the Data tab in the Property Sheet to choose

a record source• Can also specify record source later

– Add report header and footer if desired– Create a report title, if desired

Page 48: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 48

Creating Advanced Reports in Design View (cont’d.)

• Create report in Design view (cont’d.)– Display the list of fields for the table or query– Click the DESIGN tab and click the Add Existing

Fields button in the Tools group– Drag fields to Detail Section from Field List– Create page or group headers and column

headings from label controls as needed– Add grouping and/or sorting

Page 49: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 49

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

Page 50: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 50

Beyond Calculated Fields

• To use summary options from Report Wizard– Must have numeric field– Base report on query that includes numeric field

Page 51: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 51

Advanced Label Formatting

• Create query with the needed fields• Use Label Wizard to get started• Modify label layout created by Label Wizard

Page 52: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 52

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

Page 53: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 53

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

Page 54: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 54

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

Page 55: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 55

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

Page 56: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 56

Page 57: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 57

Page 58: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 58

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 used

Page 59: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 59

Adding a Chart to a Report (cont’d.)

• 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

Page 60: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 60

Level 3 Summary

• Create report in design view• Insert components into report– Chart– Subreport– Subform

• Export to Excel– Crosstab query

• Apply conditional formatting

Page 61: Ch05 cmpt110

Succeeding in Business with Microsoft Access 2013 61

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