Oracle Reports

Introduction to Oracle Reports Builder
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).

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
Oracle Reports Builder Tools
Oracle Reports Builder comes with the following components

• Object Navigator • Property Palette • Data Model Editor • Layout Model Editor • Parameter Form Editor
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. Property Palette A Property Palette is a window that displays the settings for defining an Oracle reports object. 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. Queries Queries are SQL Select statements that fetch data from the oracle database. These statements are fired each time the report is run. Groups Groups determine the hierarchy of data appearing in the report and are primarily used to group columns selected in the query. Oracle report automatically creates a group for each query. Flex mode and Confine mode Confine mode On: child objects cannot be moved outside their enclosing parent objects. Off: child objects can be moved outside their enclosing parent objects. Flex mode: On: parent borders "stretch" when child objects are moved against them. Off: parent borders remain fixed when child objects are moved against them.

Form Letter. Parameter Form Editor Parameter form is a runtime form used to accept inputs from the user. Formula columns are generally preceded by CF_ to distinguish from other columns. You base a query on a ref cursor when you want to: more easily administer SQL avoid the use of lexical parameters in your reports share datasources with other applications. Layout Model Editor A report layout editor contains the following layout objects Frames Frames surround other layout objects.Data Columns Data columns contain the data values for a report. Parameters Parameters are variables for a report that accept input from the user at runtime. • Data Enter a SELECT statement to retrieve the report data • Displayed Fields Select the fields that you want to display in the output. Boilerplate Boilerplate consists of text (label of the column) and graphics that appear in a report each time it is run. Summary columns are generally preceded by CS_ to distinguish them from other columns. enabling control of multiple objects simultaneously Repeating Frames Repeating frames acts as placeholders for groups (I.e repeating values) and present rows of data retrieved from the database. This column uses a set of predefined oracle aggregate functions. Data Links Data links are used to establish parent-child relationships between queries and groups via column matching. the wizard will take you through the below mentioned pages • Report Style Tabular. number of copies etc. corresponding to the table columns included in each query’s SELECT list are automatically created by oracle reports. . Placeholder Column Place holder Colum’s are used to store the value of the variable. you receive the added benefits that go along with storing your program units in the Oracle database. Report Wizard • When we create a default Tabular Report using report wizard. Matrix. if you use a stored program unit to implement ref cursors. Default data columns. Formula Columns Formulas can be entered in formula columns to create computed columns. Used to hold the values at runtime act as a global variables in reports Reference Cursor in reports: A ref cursor query uses PL/SQL to fetch data. Matrix with Group • Query Type Choose whether to build a SQL query or an Express query. Summary Columns Summary columns are used for calculating summary information like sum. Fields Fields acts as placeholders for columns values. average etc. Group Left. such as Form Builder increase control and security encapsulate logic within a subprogram Furthermore. These parameter values can then be used in the SQL select statements to retrieve data conditionally. Mailing Label. Oracle reports creates a set of system parameters at runtime namely report destination type. The function must ensure that the ref cursor is opened and associated with a SELECT statement that has a SELECT list that matches the type of the ref cursor. They define the formatting attributes for all columns displayed in the report. Form-Like. Repeating frames repeat as often as the number of rows retrieved. Group Above. • Fields to Total Select the fields that you want to summarize. Each ref cursor query is associated with a PL/SQL function that returns a strongly typed ref cursor. Each column is placed in the group associated with the query that selected the column. Formulas can be written using PL/SQL syntax.

Before Report Fires before the report is executed but after the queries is parsed and date is fetched.. report level columns and manipulate accordingly. These triggers are used to dynamically change the formatting attributes and used to conditionally print and not to print a report column value. ename from emp where deptno =:dno this :dno acts as bind parameter. Triggers in Reports Types of Triggers Formula Triggers: Formula triggers are PL/SQL functions that populate columns of type Formula. except the very first page. These triggers return Boolean value TRUE / FALSE.ename from emp &X At run time we can pass the entire where condition like where deptno=30 and sal>3000 etc. Bind parameters Bind parameters are used in where condition. Mailing Label shows multiple records on one page while Form Letter shows one record on each page. the value is not displayed. Format Triggers: Format triggers are PL/SQL functions executed before the object is formatted. Ex:select empno. A template contains standard information such as company logo. If the return value of the format trigger is FALSE. Before Parameter Form Fires before the Runtime Parameter Form are displayed.• Labels for Fields Alter the labels that appear for each field and the width of each field. Note: The above steps are different for each report style. and so on. 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. Used to validate the parameter values.. Group Left & Have an additional page: ‘Groups’ Group Above styles Matrix Reports styles Have 3 additional pages: ‘Matrix Rows’ ‘Columns’ ‘Cells’ Mailing Label & Have 4 pages: ‘Report Style’ ‘Data’ Form Letter styles ‘Text’ ‘Template’ The difference between Mailing Labels and Form Letters is. Can access the PL/SQL global variables. After Parameter Form Fires after the Runtime Parameter form are displayed. . Action Triggers: Action Triggers are PL/SQL procedures executed when a button is selected in the Previewer. This page is used to customize page formatting. or after report output is sent to a specified destination.. • Template Select the template that you want to use for this report. Lexical parameter Lexical parameter is used to pass an entire where condition at runtime. When u want to pass any value at runtime we use bind parameter as we use '& 'in sql and pl/sql. Ex:select empno. These triggers return Boolean values TRUE or FALSE.. date. The trigger can be used to dynamically call another report (drill down) or execute any other PL/SQL. Report Triggers: Report triggers enable execution of PL/SQL functions at specific time during execution and formatting of report. After Report Fires after the report previewer are exited. Between Pages Fires before each page of the report are formatted.

Sign up to vote on this title
UsefulNot useful