1 project 12 reports based on queries management information systems, 9 th edition, by raymond...

33
1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall, Inc.

Upload: ronald-ford

Post on 13-Jan-2016

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

1

PROJECT 12REPORTS BASED ON

QUERIES

Management Information Systems, 9th edition,By Raymond McLeod, Jr. and George P. Schell

© 2004, Prentice Hall, Inc.

Page 2: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

2

Learning Objectives:• Learn to create a report based on query

results.

• Learn to pass query parameters to reports.

• Understand how built-in Access functions can change report content.

• Understand how to generate field values based upon query values.

• Learn to make calculations within reports.

Page 3: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

3

Introduction

• Project 12 contains some advanced database concepts for queries and reports

• If you have completed Project 9 and either Project 10 or 11 then you should be prepared for this project

Page 4: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

4

EXAMPLE• This example will generate queries and reports

from data in the Textbook database• Managers typically use queries to look for specific

records and so the query is constrained to records that have certain values for fields

• Reports based on query results must usually be modified from the default report settings in order to create visually appealing reports

• Creating reports based upon query results is valuable so that the decision maker can produce documents for his or her subordinates

Page 5: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

5

Textbook Database• The Textbook database consists of four tables that

relate to each other by common values• The tables and their data fields are shown in

Figure P12.1• From Figure P12.2 you can see Amy Abner and

Brian Janski both have book number 409 to sell• In Figure P12.3, Book number 409 has a title of

“Management Information Systems” and was authored by McLeod and Schell

• Notice from Figure P12.4 that the “Queries” tab is chosen

Page 6: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

6

Page 7: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

7

Page 8: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

8

Page 9: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

9

Page 10: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

10

CREATING A QUERY AND REPORT TO SHOW BOOKS REQUIRED FOR

CLASSES• A decision maker may need to see books required

for each class• A standard report will generate this information as

long as each class requires a book. But classes that do not require a book would not be shown on a standard report

• A query must be made that will include all classes whether or not they require a book

• As an additional piece of information, the course level for a class (i.e., “Freshman,” “Sophomore,” “Junior,” and “Senior”) should be shown. Figure P12.5 displays the final report

Page 11: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

11

Page 12: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

12

Page 13: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

13

Page 14: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

14

Page 15: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

15

Page 16: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

16

Page 17: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

17

Page 18: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

18

Page 19: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

19

Page 20: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

20

Page 21: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

21

Page 22: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

22

CREATING A REPORT FROM A PARAMETER QUERY

1. Create a report using Access’ “report wizard” and choose the “Books for Classes” query as the source for the report.

2. When asked, choose the ClassNumb, Title, and Level fields for the report.

3. You do not have to do any grouping other than what is default but when you advance to the screen shown in Figure P12.11, choose to sort the results based on the values in the Title field.

4. The report layout and style can be your choice but “Stepped” and “Corporate” are frequently used.

5. Make the title of the report “Books Required for Classes” before clicking the “Finish” button and viewing the results.

Page 23: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

23

Page 24: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

24

Page 25: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

25

Page 26: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

26

Page 27: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

27

Page 28: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

28

Page 29: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

29

ASSIGNMENT1. Create a report of classes using each book. Use Figure

P12.22 to guide your report creation. Note that the book title “Counting Pennies” is not used in any class.

2. Create a report similar to Figure P12.23. That report is based upon a parameter query that asks the user to supply the class number for the report. One note of caution: Some courses will not have any students who sell books for that course. In those cases, there will be no records in the report.

3. Create a report similar to Figure P12.24. That report is based upon a parameter query that asks the user to provide a minimum enrollment size. The parameter value (55 for this example) should be displayed in the report title.

Page 30: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

30

Page 31: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

31

Page 32: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

32

Page 33: 1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,

33

END OF PROJECT 12