Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view...

16
Chapter 3 Query and Report

Transcript of Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view...

Page 1: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Chapter 3

Query and Report

Page 2: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Agenda

• Report types

• Report contents

• Report creation

• Report design view

• Query and dynaset

• Function and grouping

• Action query

Page 3: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Objectives (continued)

• Use design grid to create and modify a select query

• Explain multiple criteria rows in a query

• Use concatenation to combine fields

• Use an immediate If statement

• Define an action query

• Create a crosstab query

Page 4: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Report Types

• Columnar (vertical) report

– Simplest type

– Lists every field for every record in a single column (one record per page)

• Tabular report

– Displays selected fields in a row

– One record per row

Page 5: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Report Contents

• Report header & footer

• Page header & footer

• Group header & footer

• Detail section

Page 6: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Report Creation

• Report Wizard– Specify the table or query

– Select one or more fields

– Select layout (columnar/ tabular)

– Select a style

– Modify the resulting report

Page 7: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Report Design View

• Bound Controls– Data source is a field in the table/query

• Unbound Controls– Has no data source

– Used to display titles, labels, lines, rectangles, and graphics

• Calculated Controls– Data source is an expression (avg, sum)

Page 8: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Query

• The resulting records from a question

• Design grid: graphical tool for developing the query

• Dynaset: records satisfying the query criteria

Page 9: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Dynaset

• Looks and acts like a table

• A dynamic subset of a table

• Allows for data entry, record updating, and record deletion

• Changes update the underlying table

Page 10: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Query Creation

• Select query

• Query window views

– Datasheet view

– Design view

Page 11: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Query Selection Criteria

• AND condition

• OR condition

• Relational operators

• Between function

• NOT function

• Wild card

Page 12: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Functions and Calculated Controls

• Concatenate– Joins together fields– Example

• Name: [LastName]&”,”&[FirstName]

• IF (IIF) function– Condition, what happens if true, what

happens if false

Page 13: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Grouping Records

• Grouping allows calculations in the report for

– Count function

– Sum function

– Min function

– Max function

– Avg function

• Crosstab query displays aggregated values

Page 14: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Action Query

• Update: Changes multiple records

• Append: Adds records from one table to another

• Delete: deletes records that meet a criteria

• Make-table: Creates a new table from existing records

Page 15: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Points to Remember

• Report types

• Report contents

• Report creation

• Report design view

• Query and dynaset

• Function and grouping

• Action query

Page 16: Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.

Homework Assignment

• Practice exercises 6 and 7