Transcript CH7
Creating Database
Reports
Eyad Alshareef
1
Creating reports
Eyad Alshareef
2
Opening report builder
Eyad Alshareef
3
Use report wizard to create a report
Eyad Alshareef
4
Using report wizard
Click OK on the welcome page and then specify the
type of report that you want to create
Eyad Alshareef
5
Using report wizard
Name your report and select the desired style
Eyad Alshareef
6
Using report wizard
Select SQL query as a basis for the report
Build your query (you may be asked to log in at this point)
Eyad Alshareef
7
Using report wizard
Designate columns as group fields
Eyad Alshareef
8
Using report wizard
Select columns to appear in the report
Eyad Alshareef
9
Using report wizard
Specify labels and field length for each of the items
Eyad Alshareef
10
Using report wizard
Select a template
Eyad Alshareef
11
Using report wizard
Finish and view your report
Eyad Alshareef
12
Viewing Web report
Eyad Alshareef
13
Reports
Snapshot summary of database data
Viewed on screen
Printed on paper
Printed to a file and distributed
electronically
Eyad Alshareef
14
Introduction to Reports Builder
Database Reports
Reports Builder
Allows application developers to create reports that
display data from Oracle 10g database
Developer10g
Reports Builder allows developers to preview and
distribute reports in variety of different formats
including:
Web pages
Portable document format (.pdf) files
Eyad Alshareef
15
Report Uses
A report can:
Display SQL query data
Display summary columns
Display calculated values based on
formulas applied to database data
Be formatted to look like an invoice or
other business document
Eyad Alshareef
16
Report Styles
Tabular (table-format)
Form-like (looks like a form)
Mailing labels
Form letters
Group left and Group above
Displays master-detail relationships
Matrix and Matrix with group
Data value appears at the intersection of a
column and row heading
Eyad Alshareef
17
Creating a Report Using the
Report Wizard
1.
2.
3.
4.
5.
Enter the SQL query to retrieve all of
the report data
Choose the display fields
Specify the report master-detail
groups
Specify the field prompts
Select a predefined template
Eyad Alshareef
18
Creating a Master-Detail Report
Specify the master and detail records on the Report
Wizard Groups page
Detail records remain in Available Fields list
Master
records
Detail
records
Eyad Alshareef
19
Using Format Masks in Reports
Format masks can be applied to:
NUMBER fields
DATE fields
Format masks cannot be applied to text
fields
Eyad Alshareef
20
Report Templates
Specify report appearance characteristics
Font sizes, types and colors
Graphic images
Background shading
Page numbering
Date report is created
Stored in a file with a .tdf extension
Eyad Alshareef
21
Applying Templates to Reports
Use the Report Wizard Templates page to
specify:
The name of a predefined template
The file path specification to a custom template
To register a template file as a custom template,
modify the Developer global preferences file
(cagprefs.ora)
Eyad Alshareef
22
The Report Wizard
Templates Page
Eyad Alshareef
23
Report Builder Windows
Live Previewer
Layout Model
Shows how report will look when viewed or printed
Shows report components symbolically
Data Model
Shows underlying report data structure
Eyad Alshareef
24
Live Previewer
Eyad Alshareef
25
Data Model
Shows report data components
Query
Data
link
Record
group
Eyad Alshareef
26
Data Model Components
Record group: set of
records with the same
column headings
Column
Master-detail reports have
multiple record groups
Default record group
name:
G_first_column_name
Individual fields are
called columns
Eyad Alshareef
27
Report Column Types
Database – Scalar
Summary
Discrete data value retrieved from database
Data value calculated by applying a summary function to a
report column
Formula
Data value calculated by applying a user-defined PL/SQL
function to a report column
Eyad Alshareef
28
Layout Model
Shows reports components symbolically
Eyad Alshareef
29