Oracle Reports and XML Publisher
Oracle Reports and XML Publisher
1. REPORT TYPES
A) Tabular Report
H) OLE Report.
* 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.
Off: parent borders remain fixed when child objects are moved against them.
13. What are the different columns in reports?
Formula Column: It performs a user-defined computation on another columns data, including
Place-holder columns. Formulas are PL/SQL functions that populate formula or place holder
columns. Cannot be used to populate parameter values.
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.
Place Holder Column
A Place holder column is a column for which, the data type and value can be set dynamically
(Programmatically)
*The value can be set for a place holder column in the following places.
Before report trigger if the place holder is a report level column.
Report level formula column, if the place holder is a report level column.
A formula in the place holders group below it (The value is set once for each record of the group)
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
SRW. SET_FILED_CHAR
SRW. SET FILED _DATE
27. How to display Request ID in the reports?
* By using the parameter P_CONC_REQUEST_ID which needs to be defined always in the
reports.
28. Can u have more than one layout in report?
*It is possible to have more than one layout in a report by using the additional layout option in
the layout editor. Yes it is possible to run the report without parameter form by setting the
PARAM value to Null
29. Name some of the procedures in the SRW package ?
* SRW.Message, SRW.User_Exit, SRW.Do_Sql, SRW.Run_Report
30. Matrix Report: Simple, Group above, Nested
*Simple Matrix Report: 4 groups
1. Cross Product Group
2. Row and Column Group
3. Cell Group
4. Cell column is the source of a cross product summary that becomes the cell content.
Frames: 1.Repeating frame for rows (down direction)
2. Repeating frame for columns (Across)
3. Matrix object the intersection of the two repeating frames
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
32. What are ad-hoc reports?
*Ad-hoc Report is made to meet one-time reporting needs. Concerned with or formed for a
particular purpose. For example, ad hoc tax codes or an ad hoc database query
create_parameter_list (------)
add_parameter (----:Global_var);
run_product(.);
33. What are Physical and Logical pages in Reports ?
*A report page can have any length and any width. Because printer pages may be smaller or
larger than your report's "page," the concept of physical and logical pages is used.
Physical Page: A physical page (or panel) is the size of a page that will be output by your printer.
Logical Page: A logical page is the size of one page of your actual report; one logical page may
be made up of multiple physical pages. The Previewer displays the logical pages of your report
output, one at a time.
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.
35. Can you create a group without any break columns?
*No.
36. Types of Matrix report ?
*1. Single query 2. Multi query 3. Nested Query 4. Matrix Break
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.
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
45. Anchor Properties:
A) Child Edge percent on child edge type B) Child Object Name
C) Collapse Horizontally
D) Collapse vertically
E) Comments
F) Name
MODE = ORDER
*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.
54. Name some options of the FND FLEXSQL user exit
*CODE, APP_SHORT_NAME, OUTPUT, MODE, DISPLAY, SHOWDEPSEG, NUM or
MULTINUM, TABLEALIAS, OPERATOR, OPERAND1, OPERAND2.
55. Describe CODE option of the FND FLEXSQL user exit
*Specify the flex field code for the report (for example, GL#, MCAT).
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
*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
66. Where is FND FLEXIDVAL user exit used
*Call this user exit to populate fields for display. You pass the key flex fields data retrieved by
the query into this user exit from the formula column. With this exit you can display values,
descriptions and prompts by passing appropriate token (any one of VALUE,
DECRIPTION<APROMPT or LPROMPT).
67. What are the User PARAMETERS in the Reports?
*P_CONC_REQUEST_ID
P_FLEX_VALUE
FND USER EXITS:-FND SRWINIT sets your profile option values, multiple organizations and
allows Oracle Application ObjectLibrary user exits to detect that they have been called by an
Oracle Reports program.FND SRWEXIT ensures that all the memory allocated for AOL user
exits have been freed up properly.FND FLEXIDVAL are used to display flex field information
like prompt, value etcFND FLEXSQL these user exits allow you to use flex fields in your
reportsFND FORMAT_CURRENCY is used to print currency in various formats by using
formula column
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.
69. What are widow lines ?
* Widow lines are the minimum number of lines of the boilerplate text or field that should appear
on the logical page where the text starts to print. If the number of lines specified for this property
cannot fit on the logical page, then all lines of the boilerplate are moved to the next page.
70. What are widow records ?
* Widow records are the minimum number of instances (records) that should appear on the
logical page where the repeating frame starts to print. If the number of instances specified for
this property cannot fit on the logical page where the repeating frame is initially triggered to
print, then the repeating frame will start formatting on the next page.
71. What is 'page protect' property for objects ?
* Page protect property for an object indicates whether to try to keep the entire object and its
contents on the same logical page. Checking Page Protect means that if the contents of the object
cannot fit on the current logical page, the object and all of its contents will be moved to the next
logical page.
72. What is the horizontal of vertical sizing property of objects?
* Horizontal of vertical sizing property specifies how the horizontal or vertical size of the object
may change at runtime to accommodate the objects or data within it.
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
*Anchoring determine horizontally and vertically positioning between parent object to his child
object; It means whenever parent object is moving then child object will also move...
82) What is meant by boilerplates?
*Boilerplate consists of text (label of the column) and graphics that appear in a report each time
it is run.
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.
85) In xml report, how to print the headings in every page?
*Define it as header section.it will be printed in all pages.
86) How to debug the report?
Set the profile option Concurrent: Debug Level to 5.Run the report and get the debug log.
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.
Insert data-driven charts
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 XSLXML.
2.
4.
<?when:$DeptName=Marketing?><?call:tMark?>
<?end when?>
<?otherwise:?><?call:tDefault?>
<end otherwise>
<?end choose?>
5.
WATERMARK
PAGE LAYOUTWATERMARK (Word 2007)
Format Background Printed Watermark (Word 2003)
6.
TEXT FIELD
Developercontrolslegacy toolstext field
7.
8.
9.
The values for the form fields in the template are shown in the following table:
Form
Field
Syntax
Description
FE
<?for-each:INVOICE?>
10001-1
<?INVNUM?>
1-Jan2005
<?INVDATE?>
100.00
<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar',
xdoxslt:get_variable($_XDOCTX, 'RTotalVar') +
INVAMT)?>
xdoxslt:get_variable($_XDOCTX, 'RTotalVar')?>
EFE
<?end for-each?>
<?start@last-page:body?>
<?end body?>
18. CHART
INSERT CHARTTYPE/GROUPING/DIMENSION/MEASURE
Follow the following steps to modify the XSL definition.
Double click on the Chart image
Click Web tab
<Cell>
<xsl:value-of select="sum(current-group()/TRANS_AMOUNT)"/>
</Cell>
Change it to
<Cell>
<xsl:value-of select="sum(current-group()//TRANS_AMOUNT)"/>
</Cell>
Notice the extra / between current-group() and TRANS_AMOUNT.
19. Table of Contents/Bookmarks
Insert a section break before the first page header so that you will have a blank page as the first
page. You can use MS Words section break for this. (Insert->Break->Section Break->Next Page)
Move to the inserted first page and place your mouse cursor into the first page.
Click Insert from the tool menu and select Reference-> Index and Tables
Click Table of Content tab and choose how you want to display your Table of Contents
Click OK.
Make sure that the table of contents has <?CUSTOMER_NAME?> tag inserted.
Bookmark
1. Add the following tag before the table of contents.
<?convert-to-bookmark:?>
2. Add the following tag after the table of contents.
<?end convert-to-bookmark:?>
20. CROSSTAB
Load Crosstab_Sample_Data.xml
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.
XML Publisher supports in general right now only JPG, GIF and PNG.
Translation.
6. Click on Export Translation. XLF file will be opened.
7. In XLF file - e. g. source-language="en-US" target-language="fr-FR".Source is English and fr
is for French language and FR is territory.
8. Update the target fields in French language. In the below example source field is in English
language and target is in French language. This indicates that wherever the Invoice Date is
present in RTF template it will be
replaced by the target field in french language.
<source>Invoice Date:</source>
<target>Date de facture:</target>
9. Update the same for all fields and finally import the updated translation file.
XML Publisher (BI Publisher) cell highlighting.
Color change in XML Publisher:
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
FE ACCOUNT
CH1100.00
CH2100.00 E
The field definitions for the template are shown in the following table:
Default Text
Entry
Description
<?for-each:account?>
ACCOUNT
<?number?>
CH1
<?if:debit>1000?><xsl:attribute
xdofo:ctx="block" name="backgroundcolor">red</xsl:attribute><?end if?>
100.00
<?debit?>
CH2
<?if:credit>1000?><xsl:attribute
xdofo:ctx="block" name="backgroundcolor">red</xsl:attribute><?end if?>
100.00
<?credit?>
EFE
<?end for-each?>
FE
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