3.2.oracle reports

Upload: mayuri-bhavnani

Post on 07-Apr-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 3.2.Oracle Reports

    1/22

    1

    Oracle Reports

    Oracle ReportsOracle Reports

    Author: ESC (Oracle Applications)Author: ESC (Oracle Applications)

    Doc.ID: OraappsDoc.ID: Oraapps -- ReportsReports Ver: 1.0Ver: 1.0 Date: Oct 2003Date: Oct 2003

  • 8/6/2019 3.2.Oracle Reports

    2/22

    2

    Oracle Reports

    AgendaAgenda

    1. Oracle Reports Overview

    2. Creating a new Report

    3. Defining a Data Model for a report

    4. Specify the Layout for a Report5. Different types of Reports

    6. Report Parameters

    7. User Parameters

    8. Report Triggers

  • 8/6/2019 3.2.Oracle Reports

    3/22

    3

    Oracle Reports

    Oracle Reports is tool for developing, displaying andprinting production quality reports. It is designed for

    application developers who are familiar with SQL and

    PL/SQL. Following types of reports can be created

    using Oracle reports

    Tabular

    Group Left

    Group Above

    Matrix

    Matrix with GroupForm Like

    Mailing Label

    Form Letter

    Reports OverviewReports Overview

  • 8/6/2019 3.2.Oracle Reports

    4/22

    4

    Oracle Reports

    Basic ConceptsBasic Concepts

    There are 3 steps to building a report with Oracle

    reports

    Create a new report definition Define the data model ( choose the data,

    relationships and calculations which you will use to

    produce the report output.

    Specify the layout. You can use the default, custom ifdesired or create your own layout.

  • 8/6/2019 3.2.Oracle Reports

    5/22

    5

    Oracle Reports

    Data ModelData Model

    To specify the data for a report, define a data model.

    A data model consists of all or some of the following

    data definition objects.

    Queries

    Queries are SQL select statement that fetch data

    from database.

    External Query

  • 8/6/2019 3.2.Oracle Reports

    6/22

    6

    Oracle Reports

    Data ModelData Model

    It is the name of the external query stored in a

    database or file

    Groups

    Groups determine the hierarchy of the dataappearing in a report and are primarily used to create

    breaks

    Cross product Group

    A cross product group is generally used to create

    matrix reports

  • 8/6/2019 3.2.Oracle Reports

    7/22

    7

    Oracle Reports

    Columns

    Columns contain the data values for a report. Defaultreport columns corresponds to the table columnsincluded in each querys select list.

    Summary Column

    Summary Column is a computation that is performedon all the records of a single column. Eg sum of allthe salaries. Oracle reports has the Average, Count,First, Last, Maximum and Minimum as summary.

    Formula Columns

    A formula is a computation performed on a singlerecord spanning one or more columns.

    ColumnsColumns

  • 8/6/2019 3.2.Oracle Reports

    8/22

    8

    Oracle Reports

    Placeholder Columns

    A place holder is a dummy column for which you can

    conditionally set the data type and value via PL/SQL

    or a user exit.

    Parameters

    Parameters are variables fr your report that enables

    you to change the selection criteria at runtime.These

    parameters can be referenced elsewhere in the

    report such as PL/SQL constructs providing

    conditional logic for the report.

    ColumnsColumns

  • 8/6/2019 3.2.Oracle Reports

    9/22

    9

    Oracle Reports

    Datalinks

    Data links are used to establish parent-child

    relationships between queries and groups via column

    matching.This data link is converted into a SQL

    clause when the report is executed.

    DatalinksDatalinks

  • 8/6/2019 3.2.Oracle Reports

    10/22

    10

    Oracle Reports

    DatalinksDatalinks

  • 8/6/2019 3.2.Oracle Reports

    11/22

    11

    Oracle Reports

    Datalinks can establish two relationships

    Between one querys column and another querys

    column Between one querys group and another querys

    group ( this is useful when you want the child query

    to know about its parents data)

    DatalinksDatalinks

  • 8/6/2019 3.2.Oracle Reports

    12/22

    12

    Oracle Reports

    Layout EditorLayout Editor

    Layout editor is used to specify the Layout for the

    report. It uses following objects.

    Repeating Frames

    Repeating frames act as a placeholders for groupsand presents rows of data retrieved for the database.

    Repeating frames repeat as often as the data is

    retrieved.

    FramesFrames surround other layout objects, enabling you

    to control multiple objects simultaneously.

  • 8/6/2019 3.2.Oracle Reports

    13/22

    13

    Oracle Reports

    Fields

    Fields act as place holders for columns. They define

    the formatting attributes for all columns displayed in

    the report. A field is one of the objects that can be

    located inside a frame or repeating frame.

    Boilerplate

    Boilerplate consists of text and graphics that appear

    in a report each time it is run. E.g. Label for fields

    Fields, BoilerplatesFields, Boilerplates

  • 8/6/2019 3.2.Oracle Reports

    14/22

    14

    Oracle Reports

    Anchors

    Anchors fasten an edge of one object to an edge of

    another object,ensuring that they maintain their

    relative position.

    AnchorsAnchors

  • 8/6/2019 3.2.Oracle Reports

    15/22

    15

    Oracle Reports

    Layout RegionsLayout Regions

    Header

    The report header pages appear once at the

    beginning of each report on a set of separate

    pages.They contain text, graphics, data andcomputations.

    Main (Body/Margin)

    The body pages appear between the header and the

    trailer pages, and are the bulk of the report. Eachphysical page in this section consists of a body

    and a margin. The body contains the text,

    graphics data and computation.

  • 8/6/2019 3.2.Oracle Reports

    16/22

    16

    Oracle Reports

    Layout RegionsLayout Regions

    Trailer

    The report trailer pages appear once at the end of

    each report on a set of separate.

  • 8/6/2019 3.2.Oracle Reports

    17/22

    17

    Oracle Reports

    Report ModesReport Modes

    Confine Mode

    Confine mode restricts the movement of the fields

    outside the borders of its repeating frame.

    Flex Mode

    Flex mode resizes all the parent objects when the

    child object bumps into a parent border.

  • 8/6/2019 3.2.Oracle Reports

    18/22

    18

    Oracle Reports

    Report ParametersReport Parameters

    i Parameters e ical Parameters

    ser Parameters stem Parameters

    Report Parameters

  • 8/6/2019 3.2.Oracle Reports

    19/22

    19

    Oracle Reports

    Report TriggersReport Triggers

    Report triggers enable you to execute PL/SQL

    functions at specific times during the execution and

    formatting of report.

    Type of Triggers

    Before Report Trigger

    After Report Trigger

    Between Pages Trigger

    Before Parameter Form Trigger

    After Parameter Form Trigger

  • 8/6/2019 3.2.Oracle Reports

    20/22

    20

    Oracle Reports

    SRW PackageSRW Package

    SRW package is a collection of PL/SQL constructs,

    which include many functions, procedures and

    exceptions that you can reference in your report.

    This procedure calls the user exit named in

    user_exit_string. It is useful when you want to pass

    control to a 3GL program during a report's execution.

    Syntax: SRW.USER_EXIT (user_exit_string CHAR).

    Example: SRW.USER_EXIT(FND, INIT)

  • 8/6/2019 3.2.Oracle Reports

    21/22

    21

    Oracle Reports

    EndEnd--ofof--SessionSession

    Q&A

  • 8/6/2019 3.2.Oracle Reports

    22/22

    22

    Oracle Reports

    EndEnd--ofof--SessionSession

    Thank You