You are on page 1of 26

Oracle REPORTS

By : Prasanta
December 7, 2021 1
Introduction

Oracle Reports Builder is a powerful enterprise reporting tool used to build


reports

that dynamically retrieve data from the database, format, display and print
quality

reports. Reports can be stored in File or Database (Report Builder Tables).

December 7, 2021 2
Report file storage formats

.rdf Report
• Binary File Full report definition (includes source code and comments)

• Modifiable through Builder. Binary, executable Portable if transferred as binary.

• PL/SQL recompiles on Open/Run

.rep Report
• Binary Run-Only File

• No source code or comments. Not modifiable binary, executable.

• Report Executables

December 7, 2021 3
Reports Builder Tools

Oracle Reports Builder comes with the


following components
• Object Navigator

• Property Palette

• Data Model Editor

• Layout Model Editor

• Parameter Form Editor

December 7, 2021 4
Object Navigator

The Object Navigator shows a

hierarchical view of objects in

The report. Each item listed is

called a node and represents an

Object or type of object the

report can contain or reference.

December 7, 2021 5
Property Palette

A Property Palette is

a window that displays

the settings for defining

an Oracle reports object.

December 7, 2021 6
Data Model Editor

To specify data for a report, a data model should be defined. A

data model is composed of some or all of the following data

definition objects.

December 7, 2021 7
Data Model Editor
Summary Columns
A summary column performs a computation on another column's data. Using the Report Wizard or
Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, %
total. You can also create a summary column manually in the Data Model view, and use the Property
Palette to create the following additional summaries: first, last, standard deviation, variance.

Placeholder Columns

A placeholder is a column for which you set the datatype and value in PL/SQL

that you define.

Formula Column

A formula column performs a user-defined computation on another column(s) data,


including placeholder columns

December 7, 2021 8
Layout Model Contd

December 7, 2021 9
Layout Model Editor
A report layout editor contains the following layout objects

Frames
Frames surround other layout objects, enabling control of multiple objects
simultaneously.

Repeating Frame
Repeating frames acts as placeholders for groups (I.e. repeating values) and present
rows of data retrieved from the database. Repeating frames repeat as often as the
number of rows retrieved.

Fields
Fields acts as placeholders for columns values. They define the formatting attributes
for all columns displayed in the report.

Boilerplate
Boilerplate consists of text (label of the column) and graphics that appear in a report
each time it is run.

December 7, 2021 10
Parameter Form Editor
Parameter form is a runtime form used to accept inputs from the user.

December 7, 2021 11
Parameter Form Editor Contd………

Parameters
Parameters are variables for a report that accept input from the user at runtime.
These parameter values can then be used in the SQL select statements to retrieve
data conditionally. Oracle reports creates a set of system parameters at
runtime namely report destination type, number of copies etc.

December 7, 2021 12
Report Wizard
The welcome window will be displayed when the report builder is
invoked. Here you have the option to build the report either by using
report wizard or create the report manually.

December 7, 2021 13
Report wizard………

Press Next

December 7, 2021 14
Report Style

Select the required style of the proposed report. The report


styles are Tabular, Form-Like, Mailing Label, Form Letter,
Group Left, Group Above, Matrix, Matrix with Group

December 7, 2021 15
Report Style contd………

December 7, 2021 16
Query Type………

Select the query type here.

December 7, 2021 17
Query Statement

Write the query statement here to retrieve the data. Before going to next step you have to

connect with the database. Or you can import the query from the query builder .
December 7, 2021 18
Display Fields………

Select the fields those will be displayed in the report from the available fields.

December 7, 2021 19
Fields to Total

Select the fields for mathematical calculation. Those will be displayed as

additional fields apart from the previously selected fields.


December 7, 2021 20
Labels and Fields

Modify the labels and width of those selected fields.

December 7, 2021 21
Template

Either you can choose a predefined template for the report or from your own
designed. Again you can choose the No template radio button for plain text
formatted report and then press Finish button to run the report.

December 7, 2021 22
Triggers in Reports
Formula Triggers:
Formula triggers are PL/SQL functions that populate columns of type Formula.

Format Triggers:
Format triggers are PL/SQL functions executed before the object is formatted.
These triggers are used to dynamically change the formatting attributes and used
to conditionally print and not to print a report column value. These triggers
return Boolean values TRUE or FALSE. If the return value of the format trigger
is FALSE, the value is not displayed.

Action Triggers:
Action triggers are used to perform user-defined action. These triggers do not
return any value.

December 7, 2021 23
Triggers in Reports
Validation Triggers:
Validation triggers are PL/SQL functions that are executed when a parameter value is
entered and the cursor moves to the next parameter. These triggers return Boolean
value TRUE / FALSE.
Report Triggers:
Report triggers enable execution of PL/SQL functions at specific time during
execution and formatting of report.
Before Parameter Form
Fires before the Runtime Parameter Form are displayed. Can access the PL/SQL global
variables, report level columns and manipulate accordingly.
After Parameter Form
Fires after the Runtime Parameter form are displayed. Used to validate the parameter values.

December 7, 2021 24
Triggers in Reports

Before Report
• Fires before the report is executed but after the queries is parsed and date is
fetched.

Between Pages
• Fires before each page of the report are formatted, except the very first page.
This page is used to customize page formatting.

After Report
• Fires after the report previewer are exited, or after report output is sent to a
specified destination.

December 7, 2021 25
THANK YOU

December 7, 2021 26

You might also like