database applications – microsoft access lesson 7 designing custom reports updated 11/13 27 slides...

27
Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Upload: warren-franklin

Post on 05-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Database Applications –

Microsoft Access

Lesson 7Designing Custom Reports

Updated 11/13 27 Slides in Presentation

Page 2: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Reports Reports are Access objects used to display

information from the database in a user-friendly format.

Reports can be printed or viewed on screen. Reports are based on tables or queries.

2

Page 3: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

What is a Custom Report? A custom report is a report developed

completely from scratch applying the controls, layout, and formatting specified by the designer.

OR a report developed with the Report Wizard or Report tool to which the designer makes changes in the layout and formatting.

3

Page 4: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Designing the Report Before beginning, sketch a layout of the report. Identify the

data the report is to present including any calculations that may be required.

A report may be based upon tables, queries, or a combination of fields from tables and queries.

Select the fields to be included from the appropriate objects (tables/queries) and place them on the report.

Arrange fields in a logical and legible layout within the space allocated for the report.

Add calculated fields and other controls to provide extra details such as page numbers and the report date.

Enhance the report with graphics, lines, grouping, and formatting.

4

Page 5: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Reports - Important TerminologyYou should already have familiarity with the most of the terms listed in the next slide from your previous work, but review the important terminology relating to this lesson to ensure that you have a sound basis for this lesson.

5

Page 6: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Important TerminologyControl-any item found on a reportCompound Control-a bound control in which the field and its

label are connected and work as one objectText Box-a control used to store interactive dataLabel-a control used to enter descriptive informationGrouping-placing related items together in a reportGroup Header-a report section identifying the grouping field;

usually contains the group nameGroup Footer-report section summarizing data in a group;

often contains subtotals or counts of group items.Grouping field-an Access object used to view and maintain

data stored in underlying tablesProperties-field characteristicsFilter-temporary subset of data

6

Page 7: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Report Sections

An Access report may have up to seven distinct sections:Report Header-appears only on the first page of the report; cover pagePage Header-appears at the top of each report page; often contains report and/or section headings, page numbers, dates, etcGroup Header-appears before each group section; identifies the grouping levelDetail-contains detailed report dataGroup Footer-appears at the end of each group section; often contains group summary informationPage Footer-appears at the bottom of each report page; often contains page numbers and other reference informationReport Footer-appears at the end of the report; contains report summary information

7

Page 8: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

A report may have more than 7 sections if multiple grouping levels are included. You are not required to used all 7 sections in a report. Use only those that are necessary to present your data effectively.

Report Sections

8

Page 9: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Formatting the Report

A functional report can be created using the Report Wizard

Create reports with appeal and purpose by formatting the report and adding grouping and calculations.

See page 388 for layout enhancements. See page 402 for Report Design Guidelines.

9

Page 10: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Making Adjustments

Report design, as with form design, is a trial-and-error process. In order to evaluate the design and layout of a report, the designer must switch frequently between Design and Print Preview.

Most design changes can be reversed using Undo, including formatting applications and field modifications.

Suggestion: If you plan to make major design changes, be sure to save the report first. Then, if you don’t like your changes, you can always revert back to your original design. 10

Page 11: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Grouping a Report Grouped Report – a report in which data with a

common field is displayed together in sections

Notice in the examplethat Customer 11005appears on the reportthree times, but therecords are spreadthroughout the report.

11

Page 12: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Grouping a Report

Sorting the report helps by displaying all records with the same field contents together.

The example report has been sorted on Customer ID. Now all three records for Customer 11005appear together.

12

Page 13: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Grouping a Report

Using grouping allows the report to display with each record shown as a line item under the group header.

With grouping, you can also perform calculations on data in the group.

The example report has now been grouped on Customer ID. All three records for Customer 11005 appear as line items and a Contract Amt total has been calculated. 13

Page 14: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

How to Add Grouping to a Report In Design view click the Group & Sort button from the

Grouping and Totals group on the Design tab to display Group, Sort and Total pane.

In the Group, Sort and Total pane at the bottom of the screen, click Add a Group.

Select the field you want to group. Adding a group to a report automatically adds a group

header, but you must select additional options if you also want a group footer.

14

Page 15: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

How to Add Grouping to a Report

A Group Header section now appears in your report.

15

Page 16: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

How to Add Grouping to a Report Your report will now be grouped, but will not look very

different from a sorted report.

16

Page 17: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

How to Add Grouping to a Report In order to make the grouping

feature work most efficiently, move the textbox for the grouped field into the group header.

Make layout adjustments as necessary to improve the readability of your report.

17

Page 18: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Adding a Group FooterWhen grouping is selected, Access only adds a group header by default.To add a group footer, from Design View, click the More Options button in the Group, Sort, and Total pane.

Next, click the drop-down arrow beside without a footer section and choose with a footer section

18

Page 19: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Using a Group Footer Use a group footer to summarize data about the group such as

Totals Counts Statistics

In the example report, we’ll add an unbound textbox to the group footer section, enter the expression =Sum([ContractAmt]) in the unbound textbox, and change the label to appropriately reflect the contents of the textbox.

You also need to make sure that all fields are aligned andthat field placement isappropriate.

19

Page 20: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Report View - Group Footer Below is the example report in Report View. Notice how each

Customer ID groupincludes a totalbased on only thevalues in thatgroup.

20

Page 21: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Adding Page NumbersIt is often helpful to include page numbers on reports. Follow the instructions below to add page numbers to a custom report.

From Design View, click the Page Numbers button in the Header/Footer group of the Design tab.

21

Page 22: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Adding Page Numbers In the Page Numbers dialog box, choose how you want the page numbers to be

presented:o Format – How you want the

numbers to display• Page N (Page 2)• Page N of M (Page 2 of 18)

o Position • Top of Page (in the Header)• Bottom of Page (in the Footer)

o Alignment• Left• Center• Right• Inside (Odd pages display on the left side of the page and even pages display

on the right side of the page or on the “outside” of book-bound pages)• Outside (Page 1 displays on the right side of the page and Page 2 displays on

the left side of the page or on the “outside” of book-bound pages)

22

Page 23: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Inside Vs. Outside Page Numbering

Inside Page NumberingInside Page Numbering

Outside Page NumberingOutside Page Numbering

Page 3Page 2

Page 2 Page 3

23

Page 24: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Adding Date and TimeMany times you like to see when a report was printed. If multiple versions of a report are printed often, it is even helpful to have the time on the report. Follow the instructions below to add the date and/or time to a custom report.

From Design View, click the Date and Time button in the Header/Footer group of the Design tab.

24

Page 25: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

Adding Date and Time In the Date and Time dialog box, choose

What you want displayed (date, time, or date and time)And

How you want the date/time to be presented:• The examples by each option button show you how the date/time

will display• Date and Time controls are placed

in the Report Header by default. If you want the controls placed in another location, simply selectthe controls and drag them to the desired location. You can furtherformat the controls to display in thefont style, color, and size you want.

25

Page 26: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

You Will Also Learn AboutEntering expressionsAdding subreports

26

Page 27: Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation

End of Lesson

Work through Tutorial 7 in your Access textbook.Omit pages 430-434 of the tutorial. We will

not be creating mailing labels as part of this lesson.

Complete the assigned exercises and submit through NS Online.

27