Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.
-
Upload
ellen-walton -
Category
Documents
-
view
213 -
download
0
Transcript of Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.
![Page 1: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/1.jpg)
Reports
IT Key Ideas, Dynamic Database Systems, 2002
Chapter 5
![Page 2: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/2.jpg)
• Margins (top, bottom, left, right)
• A report heading and footer
• Page headers and footers
• Group headers and footers
• Printing controls, eg. in columns
Reports are based on queriesand add the following features
![Page 3: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/3.jpg)
other title
Main title
duplicates hidden
Group header
data
Page footer
Group footer/summary information
![Page 4: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/4.jpg)
Design view
other title
Main title
Group header
Page footer
Group footer/summary information
other information
Field names
Data boxes
![Page 5: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/5.jpg)
Headers and Footers
The information in the report header and footer are printed on one page only.
For example, the last page can present what is termed a Grand Summary. This might be a count of the records in the report, or the grand total of the prices.
![Page 6: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/6.jpg)
Headers and Footers
The information in a group header and footer is printed before or after each group respectively.
For example, at the bottom of each group Summary Information can be displayed. This might be a count of the records in the group, or the sub-total of the costs within that group.
![Page 7: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/7.jpg)
Typical database reports include
• a title (and sub-title)• a group sub-heading• column sub-headings• data• repetitive data not being printed• a summary• grand summary• and other information, be this page
numbers, date or the author of the report.
![Page 8: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/8.jpg)
Creating a Report
IT Key Ideas, Dynamic Database Systems, 2002
Example
Print a list of people with red hair in order of age, displaying the number of people in the output.
![Page 9: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/9.jpg)
Create the Query
IT Key Ideas, Dynamic Database Systems, 2002
The outcome requires the names of people and their ages, in age order, where their hair colour is red.The names of the people may be their full names, separate given names and surnames or possibly surnames only.Use the Age calculation saved from previous queries.
Field Full Name:[Given … Age:Int((Date()-… Hair Colour Surname
Sort ascending ascending
Show
Criteria red
![Page 10: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/10.jpg)
Create report by using wizard
IT Key Ideas, Dynamic Database Systems, 2002
select Create a report by using wizard and select the query
![Page 11: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/11.jpg)
the wizard prompts
IT Key Ideas, Dynamic Database Systems, 2002
which fields? all of them
but as Hair Colour will not be displayed,
choose it last
grouping? none for the current task
sorting? already sorted by Age, but if not, choose Age
layout? tabular
style? personal preference
title? something like People with red hair
preview or modify.
![Page 12: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/12.jpg)
Skills
page numbers, names, dates displaying summary calculations
grand summarygroup summary
non-repeating of repetitive data minimising the number of pages controlling printing, including page and
column breaks.
![Page 13: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/13.jpg)
Page numbers• pages numbers are displayed by the field titled
[Page]
• and the number of pages in the report by the field titled [Pages]
Text can be added to the numbers by enclosing in quotes. For example,
=“page “&[Page] or
="page " & [Page] & " of " & [Pages]NB: page numbers are only for multi-page reports.
![Page 14: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/14.jpg)
Displaying dates
as in queries, the current date can be displayed dynamically by using the calculation =Date() in a text box.
![Page 15: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/15.jpg)
Summaries
Two types, namely
• Grand summary• Summary (group summary)
A Grand Summary appears in a • Report Footer or Header
A Summary appears in a • Group Footer or Header
![Page 16: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/16.jpg)
Calculating the Summaries
The following functions are typically used
• Count• Sum• Avg• Max• Min
![Page 17: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/17.jpg)
Examples of Summaries
=Count([Surname])
=Sum([Appearance Fee])
=Avg([Age])
=Max([Mark])
![Page 18: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/18.jpg)
Examples of Summaries
When placed in the Report Footer=Count([Surname])
will display the number of records that reside in the output
![Page 19: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/19.jpg)
Examples of Summaries
When placed in a Group Footer=Avg([Age])
will display the average age for each group in the report, eg. each Hair Colour group.
![Page 20: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/20.jpg)
Avoiding repetitive data
Method 1 - Hiding
select the field showing the repetitive data in the Details section of the report choose Properties and set the property Hide Duplicates to Yes
set to Yes
![Page 21: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/21.jpg)
Avoiding repetitive data
Method 2 - Groups
click the Sorting and Grouping button andchoose a field on which to set the Groupingset the Group Header and/or Footer to Yes
set to Yes
![Page 22: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/22.jpg)
Minimising the number of pages
Keep the detail section as clean and short as possible.
Hint
Eliminate or minimise the gaps above and below the text boxes.
![Page 23: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/23.jpg)
Columns
Set these properties in Page SetupColumns
![Page 24: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/24.jpg)
when using Group Headers with Columns
In Group Header Properties set the property Repeat Section to yes.
Hint
set to Yes
to avoidthis problem
![Page 25: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/25.jpg)
Controlling printing
The printing of data in groups can be controlled by utilising the properties calledForce New Page and/or New Column.
![Page 26: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/26.jpg)
Sample output
![Page 27: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/27.jpg)
Example 2
IT Key Ideas, Dynamic Database Systems, 2002
Print a list of the (full) names of people
(alphabetically) without brownish hair colour,
displaying the number of people in each hair
colour group and also overall (using a
minimum number of pages).
![Page 28: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/28.jpg)
Sample output
![Page 29: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/29.jpg)
IT Key Ideas, Dynamic Database Systems, 2002
page 58 Practical 5.1 People
![Page 30: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/30.jpg)
Producing an output that displays
FemaleAbbott
Abram
Almond
Apponyi
…
Male
Abbery
Aitchison
Auerbach
Auld
…
where the column headings are the full word version of the gender.
![Page 31: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/31.jpg)
Create a new table
In the new table create two fields, according to the data dictionary shown
Field Name Data Type Size
Sex Text 1Gender Text 6
Save the table, eg. Genders.
![Page 32: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/32.jpg)
Enter data into the new table
Sex GenderF FemaleM Male
![Page 33: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/33.jpg)
Creating a lookup list in the many table
The data relationship between the Genders and Details tables is one to many, as a Gender has many people, but any person only has one gender.
The Genders table is referred to as the one table and the Details table is then referred to as the many table.
In this table it is possible to create a Lookup List that allows for easy data entry when entering each new person’s gender.
![Page 34: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/34.jpg)
Selecting a gender by using a lookup list
A lookup list can also be referred to as pop-down list.
![Page 35: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/35.jpg)
Creating the lookup list
Choose Design view for the Details table.Select the Sex field At the bottom, next to
General, select the Lookup tab.
![Page 36: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/36.jpg)
Change the Display Control to Combo Box.
Click on the Build button on the Row Source and this opens a query.
![Page 37: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/37.jpg)
Add the Genders table to the query and the two fields to the query
close and update the row source.
![Page 38: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/38.jpg)
Change the column count to 2as two fields were placed in the QBE,enter two Column Widths, eg. 1.5, 2.5enter a total width in List Width, eg. 4
**
*NB: the SQL statement
![Page 39: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/39.jpg)
View the table.Click anywhere in the Sex field (column) and click the Lookup arrow.
![Page 40: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/40.jpg)
IT Key Ideas, Dynamic Database Systems, 2002
page 63 Practical 5.3 People
![Page 41: Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.](https://reader035.fdocuments.us/reader035/viewer/2022070416/56649cd65503460f9499e022/html5/thumbnails/41.jpg)
Chapter 5
********************************
IT Key Ideas, Dynamic Database Systems, 2002