Oracle Reports and XML Publisher
Oracle Reports and XML Publisher
1. REPORT TYPES
A) Tabular Report B) Group Left Report
C) Group Above Report D) Form like report , Form letter
E) Matrix Report, with group F) Multi Media Report
G) Mailing Label Report H) OLE Report.
2. How do you register a report?
*Design your report.
Generate the executable file of the report.
Move the executable as well as source files to the appropriate products folder.
Register the report as concurrent executable.
Define the concurrent program for the executable registered.
Add the concurrent program to the request group of the responsibility.
3. What are the different triggers in report?
*There are five report trigger:
Before Report
After Report
Before Parameter Form
After Parameter Form
Between Pages
4. The Firing sequence for report triggers is
* Before Parameter form Trigger-Fires before the runtime parameter form are displayed.
The parameter values can be accessed and changed.
* After Parameter form Trigger.-Fires after the runtime parameter form are displayed.
The parameters can be accessed and their values can be checked.
*Before Report Trigger
Fires before the report is executed but after the queries is passed and data is fetched.
*Between Pages Trigger.-Fires between each page of the report are formatted, except the very
first pages. This is used for customized page formatting.
* After Report Trigger-Fires after exiting from the run time premier or after report output is
sent to a specified destination. (File, Printer, Mai lid etc.)This is used to clean up any initial
processing that was done such as deleting the tables. This Trigger always fires irrespective of
success or failure of the report.
Validation Triggers: Validation Triggers are PL/SQL functions that are executed when
parameter values are specified on the command line and when you accept the Runtime Parameter
Form. (Notice that this means each Validation Trigger may fire twice when you execute the
report). Validation Triggers are also used to validate the Initial Value of the parameter in the
Parameter property sheet.
Format Triggers: Format Triggers are PL/SQL functions executed before the object is
formatted. The trigger can be used to dynamically change the formatting attributes of the object.
Action Triggers: Action Triggers are PL/SQL procedures executed when a button is selected in
the Previewer. The trigger can be used to dynamically call another report (drill down) or execute
any other PL/SQL.
5. Frame: Surrounds the objects and protect them from being over written or pushed by other
objects. For example, a frame might be used to surround all objects owned by a group, to
surround column headings, or to surround summaries
6. Repeating Frame: Repeating frame surrounds all of the fields that are created for groups
columns. Repeating frame prints once for each record of the group. For frames and repeating
frames, the property elasticity defines whether the size of the frame or repeating frame should
with the objects inside of it at runtime.
7. Data Link: Data links relate the results of multiple queries. A data link (Parent Child
Relation Ship) causes the child query to be executed once for each instance of its parent group.
8. How u defines reports parameter in oracle application?
*Token in Concurrent Program creation: For a parameter in an Oracle Reports program, the
keyword or parameter appears here. The value is case insensitive. For other types of programs,
you can skip this field.
9.Parameters: A parameter is a variable whose value can be set at runtime (from the run time
parameter of the command line).User parameters are created by the user and system parameters
are created by Report Builder. System parameters cannot be renamed or deleted.
10.Bind Parameters (Variables):Bind references (or Variables) are used to replace a single
value in SQL or PL/SQL, such as a character string, number or date. Bind references may be
used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING,
CONNECT BY and START WITH clauses of queries. Bind references cannot be referenced in
FROM clauses. Bind variables can be referenced by entering a colon (:) followed immediately
by the column or parameter name. If the parameter / column are not created before making a
bind reference, report builder will create a parameter.
11. Lexical Parameters (Variables): Lexical references are place holders for text that is
embedded in a SELECT statement. Lexical Variables can replace the clauses appearing after
SLECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START
WITH. You cant make lexical reference in a pl/sql statements.
Flex mode:
Flex is the property of moving the related fields together by setting the flex property on
On: parent borders "stretch" when child objects are moved against them.
Off: parent borders remain fixed when child objects are moved against them.
Summary Column: Performs a computation on another columns data like sum, average, count,
minimum, maximum, %, total.
For group reports, the report wizard and data wizard create n summary fields in the data model
for each summary column that is defined.
One at each group level above the column being summarized.
One at the report level.
14. What are user exists in reports? What are user exist available in apps?
A user exit is a program written and then linked in to the report builder executable user exist are
written when content need to be passed from report builder to that pgm, which performs some
function and then returns control to report builder.
(OR)
This one of built-in program in report 6i, it will be used to transfer the report builder control to
some other 3rd generation language get some information complete the remaining execution
process.
FND_SRWINIT: - This is a User Exit which sets your profile option values and allows Oracle
AOL user exits to detect that they have been called by oracle repots.
Can be used in BEFORE-REPORT Trigger.
FND_SRWEXIT:- This user exit ensures that all the memory allocated for
AOL user exits have been freed up properly. Can be used in AFTER- REPORT Trigger
FND FORMAT_CURRENCY: -To format the currency amount dynamically
Depending upon the precision of the actual currency value, standard precision, users profile
values and location (country) of the site.
FND FLEXSQL - This user exits allows you to use Flex fields in Reports
FND FLEXIDVAL - This user exits allows you to use Flex fields in Reports
16. What are the type Models in the system parameters of the report?
1) Bit map 2) Character mode
18. How can you change the select statement of a query at run time?
Using lexical parameter
19. How can you call a report from Form?
Using Run_product
20. How u will debug Ur reports?
Using srw_massage
22. Suppose I have 5 pages report. On which page between pages trigger will not fire?
*hat between page trigger will fire after first page nothing but last page. (It will not fire for last
page)
24. What is the minimum number of groups required for a matrix report
The minimum of groups required for a matrix report are 4
31) What is difference between d2k report and oracle apps report
*In general D2k reports we won't use the user exits we use user exit's in oracle apps reports
2)in general D2k reports we won't use the multiOrg we use multiorg in oracle apps reports
34. What are the various page layout sections in Oracle Reports?
*A report has three sections: the report header pages, report body/margin pages, and report trailer
pages.
37. In Reports, how can you print one record per page in the output ?
*Set the Maximum records per page property of the Repeating frame to 1.
38.What is Matrix Report how many groups r there and how many queries u can use?
*The minimum of groups required for a matrix report are 4, but queries are may be one query or
more than one query. A matrix (cross-product) report
Is a cross-tabulation of four groups of data:
One group of data is displayed across the page.
One group of data is displayed down the page.
One group 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 group of data is displayed as the filler of the cells.
A form-like report
Displays one record per page, displaying field values to the right of field labels.
A matrix (cross-product) report
Is a cross-tabulation of four groups of data:
One group of data is displayed across the page.
One group of data is displayed down the page.
One group 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 group of data is displayed as thefiller of the cells.
Implicit Anchors: At runtime, Oracle Reports generates an implicit anchor for each layout
object that does not already have an explicit anchor. It determines for each layout object which
objects, if any, can overwrite it, then creates an anchor from the layout object to the closest
object that can overwrite it. This prevents the object from being overwritten. The implicit anchor
functionality saves you from having to define the positioning of each object. Implicit anchors are
not visible in the Layout editor. However, you can specify that the Object Navigator display
anchoring information using the Object Navigator Options dialog.
EXPLICIT ANCHORS: Create an anchor in the Layout editor by clicking on the Anchor tool,
dragging from one edge of the child to the one of the parent's edges, then specifying the anchor's
properties in its property sheet. Any anchor you create for an object will override its implicit
anchoring. Explicit anchors are always visible in the Layout editor unless you specify otherwise
via the Layout Options dialog
49. Why do we call FND FLEXSQL from the Before Report Trigger?
*One need to pass the concatenated segment values from the underlying code combinations table
to the user exit so that it can display appropriate data and derive any description and values from
switched value sets as needed. One gets this information by calling the AOL user exit FND
FLEXSQL from the before report Trigger.
51. If u call the user exit FND FLEXSQL with MODE = WHERE from the Before
Report Trigger. What will it do?
*This user exit populates a lexical parameter that you specify with the appropriate SQL fragment
at run time. You include this lexical parameter in the WHERE clause of the report query. This
user exit is called once for each lexical to be changed.
52. If u call the user exit FND FLEXSQL with MODE = ORDER BY from the Before
Report Trigger. What will it do?
*This user Exit populates the lexical parameter that one specifies with the appropriate SQL
fragment at run time. One includes this lexical parameter in the ORDER BY clause of the report
query. This user exit is called once for each lexical to be changed.
53. How can we display flexfield segment values, descriptions, and prompts on the report?
*Create a formula Column. Call the user exit FND FLEXIDVAL as the formula for this column.
This user exit automatically fetches more complicated information such as descriptions and
prompts so that one does not has to use complicated table joins to the flex field tables.
56. Describe the APP_SHORT_NAME option of the FND FLEXSQL user exit
*Specifies the short name of the application that owns the flex field (for example: SQLGL, INV)
57. Describe the OUTPUT option of the FND FLEXSQL user exit
*Specify the name of the lexical parameter to store the SQl fragment. One uses this lexical later
in the report when defining the SQL statement that selects the flexfield values. The datatype of
this parameter should be character.
58. Describe the MODE option of the FND FLEXSQL user exit
*Specify the mode to use to generate the SQL fragment. Valid mode are:
SELECT: Retrieves all segments values in an internal (non- displayable format).
WHERE: Restrict the query by specifying constraints on flexfield columns.
The fragment returned includes the correct decode statement if one specifies
MULTINUM. One must also specify an OPERATOR and OPERANDS.
HAVING: Same calling procedures and functionality as WHERE.
ORDER BY: Order required information by flexfield columns. The fragment
Orders your flexfield columns and separates them with a comma. The fragment returned includes
the correct decode statement, one specifies in MULTINUM.
59. Describe the DISPLAY option of the FND FLEXSQL user exit
*One uses the DISPLAY token with the MODE token . the DISPLAY parameter allows you to
specify segments that represent specified flexfield qualifiers or specified segments numbers ,
where the segment numbers are the order in that the segments appear in the flexfield window, not
the segment number specified in the Define Key Segments form.
Eg. If your MODE is SELECT and you specify DISPLAY = ALL then the SELECT
statement includes all the segments of the flexfield. . Similarly, if your MODE is WHERE and
you specify DISPLAY = ALL, then your WHERE clause includes all segments.
60.Describe the SHOWDEPSEG option of the FND FLEXSQL user exit
*SHOWDEPSEG = Ndisables automatic addition of depended upon segments to the order
criteria.The default is Y.This token is valid only for MODE = ODER BY In FLEXSQL.
61. Describe the NUM option of the FND FLEXSQL user exit
*Specify the name or lexical or source column that contains the flexfield structure information. If
the flexfield uses just one structure, specify NUM only and use a lexical parameter to hold the
value. If the flexfield uses multiple structures, specify MULTINUM only and use a source
column to hold the value. The default value is 101.
62. Describe the TABLE ALIAS option of the FND FLEXSQL user exit
*You use TABLE ALIAS if your SELECT joins to other flexfield tables or uses a self join.
63. Describe the OPERATOR option of the FND FLEXSQL user exit
*Specify an operator to use in the WHERE clause.
64. Describe the OPERAND1 option of the FND FLEXSQL user exit
*Specify an operand to use in the WHERE clause,
65. Describe the OPERAND2 option of the FND FLEXSQL user exit
Specify a second operand to use with OPERATOR = BETWEEN
68. What is the difference between Master-Detail Report and report created by breaks
* Master/detail data models are very similar to break report data models. However, a
master/detail data model is created using two queries, each of which owns at least one group, and
a data link. A break report data model is created using one query and at least two groups. While
reports based on a single query are usually more efficient than reports based on multiple queries,
sometimes the structure of your data tables may require you to link multiple tables.
73. What are the various values of the horizontal of vertical sizing property?
* The various values are:
Contract: Contract means the vertical size of the object decreases, if the formatted objects or
data within it are short enough, but it cannot increase to a height greater than that shown in the
editor. Note : Truncation of data may occur. (You can think of this option as meaning "only
contract, do not expand.")
Expand: Expand means the vertical size of the object increases, if the formatted objects or data
within it are tall enough, but it cannot decrease to a height less than that shown in the editor.
(You can think of this option as meaning "only expand, do not contract.")
Fixed: Fixed means the height of the object is the same on each logical page, regardless of the
size of the objects or data within it. Note : Truncation of data may occur. The height of the object
is defined to be its height in the editor.
Variable: Variable means the object may expand or contract vertically to accommodate the
objects or data within it (with no extra space), which means the height shown in the editor has no
effect on the object's height at runtime.
74)What are the Major differences bteween key flexfields ,descriptive flexfields key
*flexfields: capture the key information in code language each code have specific meaning
Descriptive flexfields: capture the extra information
77) How can we get odd numbered pages in output of a report u need to write stuff in
before report trigger?
78)Is it possible calling from one report to another?if possible means tell me ?
*Using srw.run_report('reportname'..........);
we can call a report from another report.
83)I have 100 pages output. I want to print 10 records per page in Template?
*Set maximum no of records per page to 10 in property of repeating frame so that it will
display 10 records on each page.
84) I want to print output in portrait style? Where I have to change the settings?
*Go to printer properties finishing tab and Choose portrait option button in orientation frame.
Navigation: Print->properties->finishing->portrait
Click ok to print in portrait style.
87) How will you get the concurrent program output as email?
*sing Shell script we can attach the output of a concurrent program.
mutt -s <subject> -a <attachment> <mail_id> < <mail body>
Eg:mutt -s "Output-conc prgm" -a XXCUST_TOP/bin/xx_pr.txt
1. What is a template Builder?
The Template Builder is an extension to Microsoft Word that simplifies the development of RTF
templates. The Template Builder is tightly integrated with Microsoft Word and allows you to
perform the following functions:
Insert data fields
Insert data-driven tables
Insert data-driven forms
Insert data-driven charts
Preview your template with sample XML data
Browse and update the content of form fields
Extract boilerplate text into an XLIFF translation file and test translations
Valid template file types are:
eText - Inbound, eText - Outbound, PDF, RTF, XSL-FO, XSL-HTML, XSL-TEXT, and XSL-
XML.
5. WATERMARK
PAGE LAYOUTWATERMARK (Word 2007)
Format Background Printed Watermark (Word 2003)
6. TEXT FIELD
Developercontrolslegacy toolstext field
12.
The values for the form fields in the template are shown in the following table:
Form
Syntax Description
Field
RtotalVar <?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', 0)?> Declares the "RTotalVar"
variable and initializes it to
0.
FE <?for-each:INVOICE?> Starts the Invoice group.
10001-1 <?INVNUM?> Invoice Number tag
1-Jan- <?INVDATE?> Invoice Date tag
2005
100.00 <?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', Sets the value of RTotalVar
xdoxslt:get_variable($_XDOCTX, 'RTotalVar') + to the current value plus the
INVAMT)?> new Invoice Amount.
xdoxslt:get_variable($_XDOCTX, 'RTotalVar')?> Retrieves the RTotalVar
value for display.
EFE <?end for-each?> Ends the INVOICE group.
15. BARCODE
Select File Properties Custom Tab
In the Name field enter: xdo-font.Free 3 of 9.normal.normal notice the name of the font must
match the name of the font in the MSWord font drop down
In the Value field enter: truetype.c:\windows\fonts \FREE3OF9.ttf
16. SORTING:
<?sort:TRANS_AMOUNT;'ascending';data-type='text'?>
Bookmark
20. CROSSTAB
Create a new RTF template
Load Crosstab_Sample_Data.xml
Go to File->Page Setup and choose Landscape as Orientation
Select Crosstab from the Template Builder tool bar. (Insert->Crosstab)
Drag and Drop Flowsto data area
Drag and Drop Bus Grp to Row Header area
Drag and Drop Type to Column Header area
Click OK.
21. Bursting
What is a bursting file ?
Its an XML file which tells bursting engine
a) to split the XML File created.
b) to deliver the Documents.
Advantages of XMLP bursting
a. No Additional Coding, just need to create XML bursting File. ( Isn't it exciting , otherwise we
would have to write java program to split the XML File and then use XMLP delivery manager
API to send emails .
b. Process of Creating XML data Definition and Template remains AS IS .
22. BLOB & CLOB
Cant generate xml data for CLOB more than 40 kb in report builder.
BLOB Images are supported in XML Publisher 5.6.2 or later.
Requirement:
Solution:
Requirement: If debit or credit value is greater than 1000 then it should become red.
XML File:<?xml version="1.0" encoding="WINDOWS-1252"?>
<!-- Generated by Oracle Reports version 10.1.2.0.2 -->
<XX_GROUP>
<accounts>
<account>
<number>1-100-3333</number>
<debit>100</debit>
<credit>300</credit>
</account>
<account>
<number>1-101-3533</number>
<debit>220</debit>
<credit>30</credit>
</account>
<account>
<number>1-130-3343</number>
<debit>240</debit>
<credit>1100</credit>
</account>
<account>
<number>1-153-3033</number>
<debit>3000</debit>
<credit>300</credit>
</account>
</accounts>
</XX_GROUP>
RTF Template:
Account Debit Credit
The field definitions for the template are shown in the following table:
Default Text
Form Field Entry Description
Entry
The code to highlight the debit column as shown in the table is<?if:debit>1000?>
<xsl:attribute
xdofo:ctx="block" name="background-color">red
</xsl:attribute>
<?end if?>The "if" statement is testing if the debit value is greater than 1000. If it is, then the
next lines are invoked.