Sie sind auf Seite 1von 89

Oracle Report Builder 10g

In Oracle R12 Environment

Stone Apple Solutions Pte Ltd

10/7/2011 1
October 7, 2011 Slide 1
Pre Requisite for the Course

 Basic Knowledge of SQL


 Basic Knowledge of PL/SQL
 E-Business Suite Navigation

October 7, 2011 Slide 2


Agenda

Introduction to Oracle Reports Developer


Oracle Reports Developer Interface
Object Navigator
Report Style
Creating Report Using Wizard
Designing and Creating Report
Report Enhancement in Oracle Builder
Report Builder For Oracle E-Business Suit

October 7, 2011 Slide 3


Introduction to Oracle Reports Developer

October 7, 2011 Slide 4


Introduction

Oracle Reports Developer (part of the Oracle Developer Suite), a powerful


enterprise reporting tool that enables you to rapidly develop and deploy
sophisticated Web and paper reports against any data source (including an
Oracle database, JDBC, XML, text files, and Oracle OLAP).

Architecture

Client Application Data Source


Tier Tier Tier

October 7, 2011 Slide 5


Report Creation Process

Create Define Specify


Report Data The
Definition Model Layout

Creation report process consist of


Report Definition
Data Model
Layout Object

October 7, 2011 Slide 6


Database Connection

Connection Setting
$ORACLE_HOME/network/admin/TNSNAMES.ora
Information :
<name of connection string > =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=<database host
name>)(PORT=<database_port>))
(CONNECT_DATA=
(SID=<sid instance database>)
)
)
Connect to Database : File  Connect ( Ctrl J )

7
October 7, 2011 Slide 7
Oracle Reports Developer Interface

October 7, 2011 Slide 8


Oracle Reports Interface

Object Navigator
Property Inspector
Editors
Tool palettes and toolbars

9
October 7, 2011 Slide 9
Object Navigator

The Object Navigator, shows a


hierarchical view of objects in your
report. Use it to gain an overview
of a report's organization.

Each list item is called a node, and


represent an object or type of
object your report can contain or
reference.

October 7, 2011 Slide 10


Property Inspector
A property Inspector is a
window that display the
settings defining an Oracle
Reports object. Each object
(query, group, frame,
parameter, etc.) has a
property Inspector.

Navigation  F4 or double
click every object

October 7, 2011 Slide 11


Editors
Editors
An editor is a work area that contains graphical representations of
related objects.
Data Model editor to manipulate (create, delete, move, resize,
copy, paste, etc.), data model objects.
Layout editor to manipulate layout objects,
Parameter Form editor to manipulate parameter form objects.

12
October 7, 2011 Slide 12
Palettes and Toolbars

Palettes and Toolbars


The Tool palettes and toolbars contain tools used to
manually create or manipulate objects in the editors.
Each editor has a tool palette and a toolbar; each tool
appears as an icon on the palette or toolbar. Some
tools, such as the Select tool, are common to all the
palettes.

October 7, 2011 Slide 13


Object Navigator

October 7, 2011 Slide 14


Components in Object Navigator

Data Model
Paper Layout
Web Source
Parameter Form
Report Trigger
Program Unit

15
October 7, 2011 Slide 15
Data Model

The Report Editor's Data Model is a work area in which you


create, define, and modify data model objects (queries, groups,
queries, groups, formula columns, summary columns,
placeholder columns, system and user parameters, and data
links) to be used in your report.

October 7, 2011 Slide 16


Data Model

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


model is composed of some or all of the following data
definition objects:
Queries
SQL Query
JDBC Query
XML
Text query
Express Server
OLAP Query
Groups
Columns
Place Holder
Formula
links

October 7, 2011 Slide 17


Paper Layout

After defining the data model, you specify the report's


layout; i.e., you position objects as you want them to
appear in the report output.

A report layout can contain any of the following layout


objects:
Repeating frames
Frames
Fields
Boilerplate
Anchors

October 7, 2011 Slide 18


Paper Layout

19
October 7, 2011 Slide 19
Web Source

Web source

October 7, 2011 Slide 20


Parameter Form

The Report Editor's Parameter Form is a work area in which you


define the format of the report's Runtime Parameter Form.

To do this, you define and modify parameter form objects (fields and
boilerplate). You can select pre-defined system parameters for your
report using the Parameter Form Builder, or you can create your
own.

Oracle E-Businees Suite didnt use this feature

October 7, 2011 Slide 21


Parameter Form

A Runtime Parameter Form can contain any of the


following objects:
fields
boilerplate

22
October 7, 2011 Slide 22
Report Trigger

Report triggers execute PL/SQL functions at specific times during


the execution and formatting of your report
Before Report trigger
After Report trigger
Between Pages trigger
Before Parameter Form trigger
After Parameter Form trigger

23
October 7, 2011 Slide 23
Report Trigger

24
October 7, 2011 Slide 24
Program Unit

Program units are packages, functions, or procedures that you can


reference from any PL/SQL within the current report.

For Report Trigger and Formula


Column the Program unit will
Automatically Created

25
October 7, 2011 Slide 25
Report Style

October 7, 2011 Slide 26


Report Style

Tabular Report

Group Above Reports

October 7, 2011 Slide 27


Report Style
Group left reports

Form-like reports
A form-like report displays one record per page, displaying field values to the right
of field labels.

Mailing label reports


A mailing label report prints mailing labels in multiple columns on each page.
Using the Report Wizard, you can specify the format for your mailing labels.

October 7, 2011 Slide 28


Report Style

Matrix reports

29
October 7, 2011 Slide 29
Creating Report Using Wizard

October 7, 2011 Slide 30


Create Report Using Wizard

Feature to create a report using Wizard : (M) File 


New Report

October 7, 2011 Slide 31


Create Report Using Wizard

Choose the type of layout

October 7, 2011 Slide 32


Create Report Using Wizard

Report Style

October 7, 2011 Slide 33


Create Report Using Wizard

Data Source type

34
October 7, 2011 Slide 34
Create Report Using Wizard

Data source Definition

October 7, 2011 Slide 35


Create Report Using Wizard

Select the fields to be displayed

36
October 7, 2011 Slide 36
Create Report Using Wizard

Select the summary Column

37
October 7, 2011 Slide 37
Create Report Using Wizard

Modify The label Name

38
October 7, 2011 Slide 38
Create Report Using Wizard

Assign a template into the report

39
October 7, 2011 Slide 39
Exercise I
Create Report Using Wizard

Create a report to display the following query


source : select empno,ename,job from emp
use wizard

October 7, 2011 Slide 40


Designing and Creating Reports

October 7, 2011 Slide 41


Simple Reports (Tabular)

Invoke the Oracle Report


Connect to the Database
Specify the data model
Create a query using the following
syntax :
select total, orderdate, custid
from ord
Specify the layout manually
Save the report using .rdf
Run the report

42
October 7, 2011 Slide 42
Simple Reports (Tabular)

Invoke the Oracle Report


Connect to the Database
Specify the data model
Create a query using the following
syntax :
select total, orderdate, custid
from ord
Specify the layout manually
Save the report using .rdf
Run the report

43
October 7, 2011 Slide 43
Simple Reports (Tabular)

Invoke the Oracle Report


Connect to the Database
Specify the data model
Create a query using the following
syntax :
select total, orderdate, custid
from ord
Specify the layout manually
Save the report using .rdf
Run the report

44
October 7, 2011 Slide 44
Exercise 2
Create Tabular Report

Use the table : DEPT


Create the following type of report

45
October 7, 2011 Slide 45
Group Reports

46
October 7, 2011 Slide 46
Group Reports

Modify the existing Report and save with other Name


Modify the data model
(Click & Drag the field CUSTID )

Change the Layout manually

October 7, 2011 Slide 47


Group Report

The data model in group report a least has more than


one group (multi group) and can be come from single
query and multiple query.

Single query : Multiple query :

October 7, 2011 Slide 48


Exercise 3
Create Group left Report
Use the following table : EMP
Create the following type of report

October 7, 2011 Slide 49


Exercise 4
Create Group Above Report
Use the following table : EMP , SALES
Create the following type of report
Use Data link between EMP Query and Sales Query

October 7, 2011 Slide 50


Formula in the Report

Computation column can be add to the report :


Summary columns

Formula columns

Placeholder columns

51
October 7, 2011 Slide 51
Report using Formula

October 7, 2011 Slide 52


Report using Formula

Modify the existing Report and save with other Name


Create the Computations using PL/SQL
Formulas computation
function TAX_TOTAL return NUMBER is
TAX_TOTAL NUMBER;
begin
TAX_TOTAL := :TOTAL + (:TOTAL * .075);
return TAX_TOTAL;
end;

Summary computation

Create the Layout

53
October 7, 2011 Slide 53
Report using Formula

Modify the existing Report and save with other Name


Create the Computations using PL/SQL
Formulas computation
function TAX_TOTAL return NUMBER is
TAX_TOTAL NUMBER;
begin
TAX_TOTAL := :TOTAL + (:TOTAL * .075);
return TAX_TOTAL;
end;

Summary computation

Create the Layout

54
October 7, 2011 Slide 54
Exercise 5
Report using Formula
Create Report which have Formula Column
This report includes the following formulas:
TAX, a computation that calculates the tax due for each order 7% from total
SALES_TOTAL, a computation that calculates the sum of the order total plus the
tax calculated by the first computation
Sub Total for Tax and Sales Tax for each custid

Create the following type of report with subtotal

55
October 7, 2011 Slide 55
Reports With Parameter

In the real report basically the report need some


dynamic filtering which will using parameters.
Modify the existing Report and save with other Name
to add Parameter : Customer ID From :
Customer ID To :
Create 3 Parameter as shown in the picture

56
October 7, 2011 Slide 56
Report With Parameter

Create PL/SQL trigger (lexical parameter)

Edit the data model queries :


select total, orderdate, custid
from ord
&P_WHERECLAUSE;

October 7, 2011 Slide 57


Exercise 6
Create Report With Parameter
User Parameter Report using (exercise2) break report.
Parameter : Dept no from
Dept no to

October 7, 2011 Slide 58


Matrix Report

A matrix report looks like a grid. As shown by the example report above,
it contains one row of labels, one column of labels, and information in a
grid format that is related to both the row and column labels.

October 7, 2011 Slide 59


Matrix Report

Create a query with a SELECT statement of:


SELECT DEPTNO, JOB, SUM(SAL)
FROM EMP
GROUP BY DEPTNO, JOB

Use Cross Product to create the following group

Create Layout using wizard

October 7, 2011 Slide 60


Exercise 7
Matrix Report
Create matrix report using the following layout
and query source :

SELECT DEPTNO, JOB, SUM(SAL)


FROM EMP
GROUP BY DEPTNO, JOB

October 7, 2011 Slide 61


Report Enhancement in Oracle Builder

October 7, 2011 Slide 62


Paper Size and Layout

Paper Layout is consist of 3 section


Header Section
Main Section
Trailer Section Change Layout
Section

63
October 7, 2011 Slide 63
Paper Size and Layout

Paper Size Setting and Orientation

64
October 7, 2011 Slide 64
Property Inspector

Source
Format Mask
Vertical and Horizontal Elasticity
Page Break Before, Page Break After
Page Protect
Print Object On
Format Trigger

65
October 7, 2011 Slide 65
Property Inspector

Source
Format Mask
Vertical and Horizontal Elasticity
Page Break Before, Page Break After
Page Protect
Print Object On
Format Trigger

66
October 7, 2011 Slide 66
Property Inspector

Source
Format Mask
Vertical and Horizontal Elasticity
Page Break Before, Page Break After
Page Protect
Print Object On
Format Trigger

67
October 7, 2011 Slide 67
Format Trigger

The format Trigger can be applied into the following


object :
Field
Frame/Repeating Frame
Boiler Plate

68
October 7, 2011 Slide 68
Exercise 8
Using Format Trigger
Create a format Trigger from exercise Create Report With
Parameter
The Condition if the JOB is President and Manager hide the value
of Salary

69
October 7, 2011 Slide 69
Report Template

Create New Template :


(M) File > New > Template

Setting the trigger, layout, program unit and attribute for


the template

Save The Template as .tdf file

Assign The template into report


(M) Tools > Report Wizard > (T) Template

70
October 7, 2011 Slide 70
Report Builder For Oracle E-Business Suit

October 7, 2011 Slide 71


Data Security

Security data base on responsibility :


Operating Unit Level
Ledger Level

October 7, 2011 Slide 72


Operating Unit Level
Initialization in a report
Create Paramater : P_CONC_REQUEST_ID data type Number
Run in the event triger (before report trigger or after parameter trigger )
SRW.USER_EXIT('FND SRWINIT');
Run the evet trigger to close the initialization (after report trigger)
SRW.USER_EXIT('FND SRWEXIT');

Base on View which being apply the policy for VPD (virtual Private Directory)
begin
mo_global.init(v_application_code);
mo_global.set_policy_context(p_access_type, p_org_id);
end;
p_access_type : S  single access code
A  all access code
M  multiple access code
X  no access
note : for multiple access to run outside apps environment use the following initializations :
begin
fnd_global.apps_initialize(v_user_id,v_resp_id,v_resp_appl_id);
mo_global.init(v_application_code);
mo_global.set_policy_context(M',null);
end;

73
October 7, 2011 Slide 73
Operating Unit Level

Base on the Table


Single operating Unit get the org_id :

Function : MO_GLOBAL.get_current_org_id

multi operating Unit get the org_id :

select * from mo_glob_org_access_tmp


note : to populate the value outside apps environment used the following
initializations :
begin
fnd_global.apps_initialize(v_user_id,v_resp_id,v_resp_appl_id);
mo_global.init(v_application_code);
end;

74
October 7, 2011 Slide 74
Ledger Level

Profile : $PROFILES$.GL_ACCESS_SET_ID

select ledger_id
from gl_access_set_ledgers
where acccess_set_id = :$PROFILES$.GL_ACCESS_SET_ID

75
October 7, 2011 Slide 75
Deploying The Report
in the E-Business Suite
Copying the report File
Create Parameter and data type of parameter
Register report
Register report for user access

76
October 7, 2011 Slide 76
Copying the report File

Directory Structure for the reports file :


$<module_name>_TOP>/reports/US

77
October 7, 2011 Slide 77
Creating Parameter and
data type of parameter
Create value set :
(R) System Administrator >Application > Validation > Set

78
October 7, 2011 Slide 78
Creating Parameter and
data type of parameter
Create validation value set for table validation type :
(R) System Administrator >Application > Validation > Set>(B)
Edit Information

79
October 7, 2011 Slide 79
Register report in
Oracle E-Business
Register The Executable :
(R) System Administrator >Concurrent > Program> Executable

80
October 7, 2011 Slide 80
Register report in
Oracle E-Business
Register The Concurrent Program :
(R) System Administrator > Concurrent > Program> Define

81
October 7, 2011 Slide 81
Register report in
Oracle E-Business
Register The Concurrent Program :
(R) System Administrator > Concurrent > Program> Define

82
October 7, 2011 Slide 82
Register report in
Oracle E-Business
Register The Parameter
(R) System Administrator > Concurrent > Program>
Define>(B) Parameters

83
October 7, 2011 Slide 83
Register report in
Oracle E-Business
Register The Parameter
(R) System Administrator > Concurrent > Program>
Define>(B) Parameters

84
October 7, 2011 Slide 84
Register report in
Oracle E-Business
Register The Concurrent Program :
(R) System Administration > Concurrent > Program

85
October 7, 2011 Slide 85
Register reports for user access

Register for user access


(R) System Administrator > Security > Responsibility > Request

86
October 7, 2011 Slide 86
Exercise 9
Create Report in Oracle E-Business
Create Report using AR_CASH_RECEIPTS_V
Operating Unit Mode Single
Parameter : Receipt Date From , Receipt Date to, Receipt Number
(option)
Receipt Date From : xxxx Print Date : <curr date>
Receipt Date To : xxxx Receipt List

Receipt Date Receipt Number Amount Currency Code Status

Xxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxxxx xxxxxx


Xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxxxx xxxxxx

87
October 7, 2011 Slide 87
Report Debugging

Concurrent Request Log File


SRW.MESSAGE to display the debug message

October 7, 2011 Slide 88


List Table Name for Exercise

EMP
DEPT
SALES
ORD
ORDPICT

October 7, 2011 Slide 89

Das könnte Ihnen auch gefallen