Professional Documents
Culture Documents
Thomas Korbecki
oAppsNET Partners, LLC
Lab One specific topics:
| Generate reports in Character Mode for WYSIWYG
| How functions work within a report
| Are there pro's/con's to using multiple queries vs. a single
query with joins in a report?
| How best to manage groups of data so that little or no
intervention is needed to the report layout.
| Best approach to adding an additional field to a report
layout.
| Layout navigation - Secrets to moving or centering objects.
| Layout (grouping, breaks, use of different formats, page
setups)
| Creating and dropping temp tables in reports. Doing
massive amounts of "setup" queries before the reports can
be generated. Or, failing that, calling a report from PL/SQL.
Reports Welcome Dialog
When you first open Reports
6i, the reports welcome
dialog box opens. For most
purposes, we will build our
on report manually, or open
an existing.
To suppress window:
Uncheck ‘Display at Startup’.
Print Report
E-Mail Report
Object Navigator
Properties Add Object of highlighted type
Expand highlighted
object one level
Collapse highlighted
object one level
Create Magnify
Query
Ref Cursor Query
Express
Query Summary Column
Notes:
• If building/modifying reports for apps,
do not modify in Reports 6i
• System Parameters come into play
when printing from operating system
• Parameters can be modified at runtime
Data Model Overview
User Parameters
•Tool Bar:
Bar Perform
basic report
activities
•Tool Palette:
Palette Perform
Layout specific
functions
•Layout Canvas:
Canvas
Workspace for setting
up report layout
Layout Editor Overview
Triggers fire at
specific events and
can execute
PL/SQL
Triggers Overview
Before Report Trigger
•Fires after the Parameter form is
executed, but before report is spooled
•False conditions stops processing
Triggers Overview
Format Trigger
•Can be used in any
Layout object
Step 1:
From Object Navigator access Data
Model
•Double click Data Model icon
•Right click Date Model and select
Editor…
Working in the Data Model
SQL
Click Sql Button.
Step 1:
Point and click on the Summary
Column icon
Step 2:
Point and click in the
APPROPRIATE area of the Data
Model
Working in the Data Model
Summary Column
Step 3:
Access the
Summary Column
property palette
Working in the Data Model
Summary Column
Choose Datatype
and width
Click on PL/SQL
Formula to add code
to the formula
column
Working in the Data Model
Formula Column
Define any variables
before ‘begin’
Define exceptions
for function.
Working in the Data Model
Formula Columns
Click Compile.
If no errors show at
the bottom of the
window, you can
close the window.
Create Formula
column, and write
code to populate
placeholder
columns. Reference
the placeholder
columns as you
would any other
report columns.
Working in the Layout Editor
Data Report
Wizard Wizard
A frame protects the objects it encloses and controls the frequency with
which those objects are formatted. Frames can enclose other frames.
Print Direction
(repeating frames) Down
Across
Down/Across
Across/Down
Working in the Layout Editor
Fields
Source of Fields
• System Variable such as a date or page number
• Column name from the query
• System Parameters, such as item number, revision
Parent Child
R_orders
Source is G_orders
from data model
Green Repeating
M_orders_GRPFR Frame
White frame (also surrounds
surrounding entire turquois frame)
layout
Working in the Layout Editor
Data and Layout Relationship
F_order_type
‘order_type’ column from
G_orders group frame
Working in the Layout Editor
Modify Layout and Object Navigator
Tasks:
1. Add a group frame around
request_date and
schedule_date in the
R_attachments group frame
(turquoise).
Working in the Layout Editor
Modify Layout
Click Icon to add
new ‘Frame’
Verify with
Object
Navigator
Working in the Layout Editor
Modify Layout
Re-size new group frame to normal
Go to
property
pallete for
new group
frame.
Assign a
name, using
‘M_<name>’
| Lexical Parameters
| Triggers
| Report Properties
| SRW.EXITS
Advanced Topics
Creating User Parameters
You can create your own parameters and use them to change the SELECT
statement of your query at runtime.
A USER parameter is an object that you create to hold a value that users can
change at runtime.
Lexical & any part of the SELECT No, You must always create
statement the parameter in the
Object
Navigator yourself. Data type
must be CHARACTER
Advanced Topics
Bind References - Examples
• Frames
• Repeating Frames
• Fields
• Boilerplate Objects
Advanced Topics
Format Trigger - Example
srw.reference (:currency1);
srw.reference (:c_extended_price);
srw.reference (:RP_CURR_PROFILE);
srw.user_exit (
'FND FORMAT_CURRENCY
CODE=":currency1"
DISPLAY_WIDTH="13"
AMOUNT=":c_extended_price"
DISPLAY=":c_extended_price_dsp"
');
return (:c_extended_price_dsp);
end;
Advanced Topics
SRW - Set Environment for Multi Org
Before Report Trigger - Sets the Views
BEGIN
BEGIN
SRW.USER_EXIT('FND SRWINIT');
EXCEPTION
WHEN SRW.USER_EXIT_FAILURE THEN
SRW.MESSAGE (1000,'Failed in BEFORE REPORT trigger -
SRWINIT USER EXIT');
return (FALSE);
END;
Advanced Topics
SRW - Set Environment for Multi Org
After Report Trigger - Resets the Environment
SRW.USER_EXIT('FND SRWEXIT');
EXCEPTION
when srw.user_exit_failure then
srw.message(1,'Failed in AFTER REPORT TRIGGER');
return (FALSE);
| Example to
Populate Report
table from a report
formula column.
Table exists on
database:
Advanced Topics
FND_REQEUST.SUBMIT_REQUST
| Used this to call report from a report, form, or pl/sql. If this call is
successful, l_request_id = concurrent manager request_id, else
it will equal 0:
l_request_id := FND_REQUEST.SUBMIT_REQUEST('XGDR',
'XGDR_WIP_LABELS',
'',
'',
FALSE,
jobs.d_job,'','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','',
'','','','','','','','','','' );
Advanced Topics