Oracle Reports Builder

Slides:



Advertisements
Similar presentations
A Guide to Oracle9i1 Creating Database Reports Chapter 7.
Advertisements

© 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post.
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
® Microsoft Office 2010 Word Tutorial 3 Creating a Multiple-Page Report.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Developing Effective Reports
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Chapter 7: Creating Database Reports
Introduction To Form Builder
1 Chapter 5: Introduction To Form Builder. 2 Forms  Why Do We Use Form Builder?  Why Don’t We Use SQL Only?!
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Access Lesson 4 Creating and Modifying Forms
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.1 Exploring Microsoft Office Excel Copyright © 2008 Prentice-Hall. All rights.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Eyad Alshareef 1 Creating Database Reports. 2Eyad Alshareef Creating reports.
Developing Effective Reports
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Working with a Database
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Copyright © 2008 Prentice-Hall. All rights reserved. Committed to Shaping the Next Generation.
11 Exploring Microsoft Office Excel 2007 Chapter 4: Working with Large Worksheets and Tables Chapter 04 - Lecture Notes (CSIT 104)
© 2002 ComputerPREP, Inc. All rights reserved. Excel 2000: Database Management and Analysis.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
CSS/417 Introduction to Database Management Systems Workshop 2.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
Microsoft Excel. Excel specializes in creating and designing spreadsheets, or worksheets Worksheet – area to insert data Workbook – a set of worksheets.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
PRINTING & PAGE BREAKS 1 Nolan Tomboulian Tomboulian.Wikispaces.com.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation.
XP. Objectives Sort data and filter data Summarize an Excel table Insert subtotals into a range of data Outline buttons to show or hide details Create.
Microsoft® Excel Key and format dates and times. 1 Use Date & Time functions. 2 Use date and time arithmetic. 3 Use the IF function. 4 Create.
Key Applications Module Lesson 17 — Organizing Worksheets Computer Literacy BASICS.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
1 Guide to Oracle10G CHAPTER 7: Creating Database Reports 7.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Printing Reports. Creating Reports  Reports are the best way to put information from database onto paper, PDF files, and other formats.  In a report,
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Preface IIntroduction Course Objectives I-2 Course Content I-3 1Introduction to Oracle Reports Developer Objectives 1-2 Business Intelligence 1-3 Enterprise.
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
Excel Chapter 1 Creating a Worksheet and an Embedded Chart
Microsoft Excel Illustrated Introductory Workbooks and Preparing them for the Web Managing.
CHAPTER 7 LESSON B Creating Database Reports. Lesson B Objectives  Describe the components of a report  Modify report components  Modify the format.
Forms Concepts Triggers Fired when Internal/External events occur
Microsoft Office Access 2010 Lab 3
Working in the Forms Developer Environment
Key Applications Module Lesson 17 — Organizing Worksheets
Creating LOVs and Editors
Building a User Interface with Forms
Database Applications – Microsoft Access
Creating Database Reports
Creating Noninput Items
From and Report.
Chapter 8 Advanced SQL.
Creating Additional Input Items
Unit J: Creating a Database
Presentation transcript:

Oracle Reports Builder © 2010 Wipro Ltd – Internal & Restricted

Generating Reports as per required format and selection criteria Objectives Generating Reports as per required format and selection criteria Oracle Reports Features and Benefits Developing and executing Reports 2

Agenda Report Builder Components Data Model Editor Layout Editor Parameter Form Report Triggers & Program Units SRW Packages Report Types Matrix Report

Report Builder Components Oracle Reports is a tool used to build reports that dynamically retrieve, format, and distribute information which is stored in the database. Its Object navigator helps you navigate among the objects in your report The Data Model editor lets you define the data selection query for the report. The Layout editor allows you to create the report layout

Report Builder Components The Parameter Form editor allows to customize the appearance of the Runtime Parameter Form, a window that optionally appears at runtime and enables you to enter parameter values that affect report execution. The Report Editor's Live Previewer view enables you to preview and inspect your report output page by page. Report triggers execute PL/SQL functions at specific times during the execution and formatting of your report. Program units are packages, functions, or procedures that you can reference from any PL/SQL within the current report. 5

Data Model Editor Data model is composed of : Queries Groups Columns Parameters Links Queries are SELECT statements that fetch data from a standard database. Groups determine the hierarchy of the data appearing in a report, and are used primarily to create breaks.

Data Model Editor Columns contain the data values for a report. Default report columns corresponding to the table columns included in each query's SELECT list are automatically created by Oracle Reports, then each column is placed in the group associated with the query that selected the column. If you want to perform summaries and computations on database column values, you can create new columns. Parameters are variables for your report that enable you to change selection criteria at runtime. Data links are used to establish parent-child relationships between queries and groups via column-matching.

Data Model - Query Create a query with the SQL Query icon in the Data Model editor. A default group is created with all the columns of the SELECT statement.

Data Model – Group Groups are created to organize the columns in your report. Groups can do two things: separate a query's data into sets , and filter a query's data There are two types of groups in Oracle Reports: Default (created by Oracle Reports) User-created (created by you) Break groups are created to produce subtotals

Data Model – Column A database column represents a column that is selected by the query. By default, Oracle Reports generate one column for each item in a query's SELECT list, and assigns each column the data type and width specified in the database data dictionary. The default columns are placed in the default group. There are two types of columns: Default User-created Summaries Formulas Place holders

Parameters Default (system parameters) User-created (bind and lexical parameters)

User Parameters Bind References Lexical References Use a bind reference when you want the parameter to substitute only one value at runtime. Precede a bind reference with a colon (:), eg: WHERE 1=1 AND PURC_ORDER.SUPPLIER_NO = :P_SUPPLIERNO Lexical References Use a lexical reference when you want the parameter to substitute multiple values at runtime. Precede a lexical reference with an ampersand (&), eg: Select ename,Job,sal from emp &wh The Parameters will be automatically created if not available. Set the value of Lexical parameters in Before report trigger as per business requirement, eg: If :P_PONO is NULL then :wh := 'AND PURC_ORDER.SUPPLIER_NO ='''||:P_SUPPLIERNO||''''; End if;

User Parameter On the parameter property sheet, you can specify the list of values can be derived from a SELECT statement or from static values that you specify. Enter the parameter's data type and size. Initial Value is the default value for the parameter.

Data Model – Data Link Data links relate the results of multiple queries. A data link (or parent-child relationship) causes the child query to be executed once for each instance of its parent group. Click on the parent group and click on the data link icon. Then click on the master column of the parent group and drag to the corresponding column of the child group. The link properties can be viewed as this.

Layout Editor

Layout Layout objects define a report's format; i.e., the positioning and appearance of data, text, and graphics in the report output. It has 3 sections Main Section Header Section Trailer Section In every section there is Margin where you can put fields or Boiler plate texts. Various Layout Objects are Frames Repeating Frames Fields Boilerplate Text

Layout -Frames A frame contains data and other report objects. It prints only as often as the object by which it is enclosed. A frame is not record-related It looks like a rectangle with two diamond shapes on both vertical sides. Create frames to group together objects to ensure they maintain their relative positions during printing It demarcates sections in your report

Layout – Repeating Frames A repeating frame is a container for records. It prints once for each record of the group, with which it is associated. It looks like a rectangle with an Arrow which indicates the direction of printing. Across: Each instance of the repeating frame subsequent to the first instance is printed to the right of the previous instance Across/Down: Each instance of the repeating frame subsequent to the first instance is printed to the right of the previous instance until the right margin of the page. Then Report Builder prints the next instance below the left-most instance on the page. Down: Each instance of the repeating frame subsequent to the first instance is printed below the previous instance. Down/Across: Each instance of the repeating frame subsequent to the first instance is printed below the previous instance until an entire instance cannot fit inside the bottom margin of the page. At that time, Report Builder prints the instance to the right of the topmost instance on the page.

Layout –Fields Fields refer to columns and parameters viz: &Current Date &Logical Page Number &Total Logical Pages For manually created fields the source need to be associated appropriately.

Layout –Boilerplate Boilerplate is text, lines, or graphics not fetched by a query, yet appearing in the report output. Use boilerplate to customize your report, such as creating heading pages, adding graphics, etc. Boilerplate from Files If you have a text or graphic file that you would like to display as boilerplate in your report, you can: Import the contents of the file using the Import dialog box When you import a file, a boilerplate object is created and the contents of the file are placed in the boilerplate object. The boilerplate object's contents are static. They remain the same even if you later change the contents of the file. Link to the file Linking to a file means that the contents of the file are pulled into the boilerplate object each time the report is run. In this way, you can ensure that your output includes the most recent changes to the file.

Layout – Print conditions The Print Condition property defines when an object is triggered to print, relative to when its owner (parent object) prints. Ownership is determined either by explicit or implicit anchors, or by enclosing an object . All :Triggers the object to print on all logical pages on which the parent prints (e.G., Column labels that print on all pages because they are anchored to the page) All but first :Triggers the object to print on all but the first logical page on which the parent prints (e.G., Page numbers that begin on page two because they are anchored to the page) All but last :Triggers the object to print on all but the last logical page on which the parent prints (e.G., An end-of-page summary that is replaced on the last report page by an end-of-report summary) First :Triggers the object to print on only the first logical page on which the parent prints (e.G., Column labels that only appear once) Last :Triggers the object to print on only the last logical page on which the parent prints (e.G., Summaries or group footers) Default :Has oracle reports evaluate the object's position to determine which of the above is most relevant

Layout – Concepts (Contd.). Page Protect The Page Protect property causes all objects within a repeating frame or frame to remain together on the same logical page, when possible. If it is impossible to keep them on the same page, Oracle Reports will let them span multiple pages. Format Triggers A format trigger contains PL/SQL executed when the object is formatted Page Protect for a repeating frame means that Oracle Reports should protect one record of the repeating frame. For a frame, it means Oracle Reports should protect all enclosed objects, including all records of any repeating frame enclosed within the frame. The Keep with Anchoring Object property causes the parent object to move to the next page if its child object cannot appear with it on the same page. Keep with Anchoring Object uses any existing explicit anchor to determine the parent. If there is no explicit anchor, an implicit anchor is used.

Parameter Form

Parameter Form Objects Parameter form appears at runtime in which you can override default parameter values. The Runtime Parameter Form is built using two report-level objects: Fields Boilerplate Field Boilerplate

Parameter Form Field Field is the actual value of the parameter that is being captured at run time. This has the following properties: Name Data type Source Source is the parameter from which the parameter form field gets its value. A list of values is provided and it contains all parameters in the report.

Building a parameter form Use Parameter Form Builder to build the parameter form. The Parameter Form Builder is the work area in which you select the report's Runtime Parameters. When you run a report, Oracle Reports uses the Parameter Form editor as a template for the Runtime Parameter Form. Fields and boilerplate appear in the Runtime Parameter Form exactly as they appear in the Parameter Form editor.

Report Triggers & Program Units

Report Triggers Report triggers are PL/SQL subprograms that fire at specific times during report execution and formatting. Report triggers govern conditional printing. Report triggers have PL/SQL packages that enable changing of the format attributes of an object at run time. Report triggers enable changing of properties such as color, style, format mask, spacing of a field or a boilerplate text. List of Report Triggers in the order of execution: Before Form After Form Before Report Between Pages After Report

Report Triggers Before Form – Fires before the Runtime Parameter form is displayed. This trigger enables accessing and changing the values of parameters, PL/SQL global variables and report level columns. After Form – Fires after the Runtime Parameter form is displayed. This trigger enables accessing parameters and checking their values. This trigger can also be used to change parameter vales or, if an error occurs, return to the Runtime Parameter Form. Columns from the data model are not accessible from this trigger. Before Report – Fires before the report is executed but after queries are parsed and data is fetched. Between Pages – Fires before each page of the report is formatted, except the very first page. This trigger can be used for customized page formatting. After Report – Fires after the Previewer is exited, or after report output is sent to a specified destination, such as a file, a printer. This trigger can be used to clean up any initial processing that was done, such as deleting tables. This trigger always fires irrespective of whether or not the report completes successfully.

Create a PL/SQL Report program units are packages, functions, or procedures that you can reference from any PL/SQL within the current report. In the Object Navigator, select the Program Units node, then select Navigator-->Create (or the Create tool). In the Program Unit editor, click in the Source Text field and type or modify the text of the subprogram.

Open a PL/SQL In the Object Navigator: Double-click on the P icon in the subprogram under the Program Units node. Or, if you know what object references the PL/SQL, double-click on the PL/SQL icon in the node that represents the object. In the Program Unit editor, modify the text of the subprogram as desired.

SRW Packages

SRW Packages Oracle Reports is shipped with a collection of PL/SQL constructs called SRW (SQL Report Writer) package which contain many functions, procedures and exceptions that can be referenced in your libraries or reports viz. SRW.MESSAGE(msg_number NUMBER, msg_text CHAR); Displays a specified message and message number. SRW.DO_SQL(sql_statement CHAR); Executes specified SQL statement. SRW.DO_SQL_FAILURE; Stops report execution upon SRW.DO_SQL failure. SRW.PROGRAM_ABORT; Stops execution of report when raised. SRW.RUN_REPORT(command_line CHAR); Executes specified R25RUN command SRW.RUN_REPORT_FAILURE; Stops report execution when failure of SRW.RUN_REPORT occurs.

Report Types

Report Types Tabular Mailing Label Form Letter Master/Master Report Master/Detail Report Group Left Group Above

Tabular Report A tabular report is the most basic type of report you can build. The report output is organized in a multi-column, multi-row format, with each column corresponding to a column in the database table.

Mailing Label Report A mailing label report consists of data displayed in a format suitable for use as address labels on envelopes. The labels can be printed in one or many columns, and can begin at any position.

Form Letter Report Form letter reports contain database values embedded in boilerplate text. Boilerplate text can be defined as any text that appears each time the report is run

Master/Master Report A master/master report displays at least two sets of data which are not directly related--that is, the records constituting the data are fetched using at least two separate queries

Break Report (Group Left) Break reports divide the rows of a table into "sets," based on a common value in one of the columns.

Create a break report when you want to prevent a column from repeatedly displaying the same value while other column values in the rows change. A break report resembles a master/detail (or parent/child) report in that one master record prints, followed by all the detail records with which the master has something in common. Reset Level The reset level, also known as the reset group, determines when to reset the value of the summary column to zero--in other words, how much of the source column to summarize.

Break Report (Group Above)

Master/Detail Report A simple master/detail report contains two groups of data: the master group and the detail group. Master/detail reports are similar to break reports in the way they fetch data; for every master or break group, related detail records are fetched.

Matrix Report A matrix (cross tab) report contains one row of labels, one column of labels, and information in a grid format that is related to the row and column labels. A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database.

Matrix Report A matrix report is a cross-tabulation of four sets of data: One set of data is displayed across the page. One set of data is displayed down the page. One set of data is the cross-product, which determines all possible locations where the across and down data relate and places a cell in those locations. One set of data is displayed as the "filler" of the cells.

Matrix Report Queries Although matrix report always require at least four groups, they can be built with any number of queries. If you build a matrix report with only one query (usually the most efficient structure), you must create at least three groups manually in addition to the one created by default.

Matrix Report Group Structure Two dimension groups. Dimension groups are created for row and columns of the Matrix report. One cross product groups. The cross product group represents all possible combinations of the values of the dimension groups. In the layout, the cross product group is represented by the intersection of the repeating frames for the across and down dimension groups One cell, or "filler" group. The cell group contains the actual information that is represented by the cells of the cross product.

Matrix Layout A Matrix Report Layout should contain: At least two repeating frames, one with a print direction of down and one with a print direction of across A matrix object created for the cross product group, inside of which reside the cells of the matrix Boilerplate for each column and row of values, as well as for summaries .

Thank You