You are on page 1of 25

OBIEE 11g Architecture

Posted on September 4, 2014by Naveen Kumar

In this article we will briefly explain the new OBIEE 11g architecture and its
components.

We can identify two main component types the OBIEE 11g: The A) Java Components and the B)
System Components.

A) Java Components: These are basically J2EE applications running in Weblogic Server. There
are two subcomponents here: 1. Admin Server and 2. Managed Server. Each of them running in
a dedicated Java virtual machine (JVM).
1. Admin Server: This is nothing more than a set of J2EE applications that will help us
Administering the system:
 Admin Console (WLS) — An adminstrative user interface that provides advanced
management for Weblogic, JEE components, and security
 Fusion Middleware Control — An administrative user interface that is used to manage the BI
domain.
 JMX MBeans — Java components that provide programmatic access for managing a BI
domain.
2. Managed Server: These are J2EE applications which will help the functioning of the BIEE
System (highlighted in RED):
 BI Plugin — It routes HTTP and SOAP requests to BI Presentation Services.
 BI Security — It enables the integration of BIEE Server and Fusion Middleware security
platform through webservices calls.
 BI Action Services — It provides the dedicated Web services that are required by the Action
Framework (a nice introduction can be found here, another example of use is here and here)
and that enable an administrator to manually configure which Web service directories can
be browsed by users when they create actions.
 Webservices SOA — This component provides Web services for objects in the BIEE
Presentation Catalog, to invoke analysis, agents, and conditions.
 BI Office — This component provides the integration between Oracle Business Intelligence
and Microsoft Office products.
and finally
 Two particular applications: BI Publisher (Reporting System) and RTD (technology platform
which enable the analysis of data and provides insight by using data mining algorithms and
techniques in real time).
B) System Components: These are non-J2EE components, such as processes and
services written in C++ and java.

 BI Server — It provides capabilities to query and access data as well as services for accessing
and managing the RPD file (BIEE Metadata).
 BI Presentation Services — It provides the framework and interface for the presentation of
business intelligence data to Web clients. It maintains an Oracle BI Presentation Catalog
service on the file system for the customization of this presentation framework.
 BI Scheduler — Provides extensible scheduling for analyses to be delivered to users at
specified times. (BI Publisher has its own scheduler.)
 BI JavaHost — It enables BI Presentation Services to support various components: Java
tasks for BI Scheduler, BI Publisher, and Graph generation.
 BI Cluster Controller — It distributes requests to the BI Server, ensuring requests are evenly
load-balanced across all BI Server process instances in the BI domain.
In addition, the BI Domain requires a set of configuration files, the repository (RPD)
file, the Presentation Catalog files, etc. Likewise, BIEE System uses a set of metadata
tables stored in a relational database like Oracle.

How to Start BIEE System: There are multiple ways to start the BIEE System, but it
must follow certain order. Based on the description given above we need to :

1. Start NodeManager : By default in Windows it runs when the OS starts (Reference


about NodeManager can be found here)
2. Start Admin Server : Initiate Weblogic Server.
3. Start Managed Server : Initiate the main applications. Based on the picture above,
these are highlighted in Red : BI Plugin, BI Security, BI Action Service, BI Webservices
SOA. If you are planning to use BI Publisher or RTD then it must also be started.
4. Start BIEE Services : These are the main BIEE processes which are controlled by
OPMN: BI Server, BI Presentation Server, BI JavaHost. If you are planning to use BI
Scheduler then also start it. Or if your instance is a clustered environment then also start
the BI Cluster Controller.
RTF Template BI Publisher XML Tags in
oracle
Concatenation tag:

<?xdofx:rpad(FIRST_NAME||LAST_NAME),30,'x')?>

<?value-of:concat(Payee/Address/City,’, ‘,Payee/Address/State)?>
If tag:

<?IF:COMM=’’?>SRY<?END IF?><?IF:COMM!=’’?><?COMM?><?END IF?>

Else if:

<?xdofx:if COMM!='' then SAL+COMM else SAL end if?>

DECODE TAG:

<?xdofx:decode(COMM,’’,’sry’,COMM)?>

<?xdofx:decode(COMM,’’,ENAME,COMM||’, ’||ENAME)?>

CHR:

<?xdofx:chr(65)?>

<?xdofx: to_char(sysdate,'dd-mm-yyyy')?>

ROUND:

<?xdofx: round(9.6)?>

SORT:

<?for-each:G_EMPNO?><?sort:ENAME;’ascending’;data-type=’char’?>

<?ENAME?>

<?end for-each?>

SUM:

SUM:<?2+3?>

<?xdoxslt:sum(SAL)+xdoxslt:sum(COMM)?>

<?sum(current-group()//SAL)?> //when ever we use double group it shows total sal for current group.

PAGE BREAK
<?split-by-page-break:?>

(OR)

<?for-each-group@section:G_EMPNO;DEPTNO?>//AUTOMATICALLY IT SPLIT DEPT WISE

PAGE LAYOUT:

IT DISPLAYS INFORMATION LIKE NOTE,TERMS ETC IN THE ODD OR EVEN PAGE. IN HEADERS AND FOOTERS REGION
WE CAN DISPLAY GO TO FILE AND SELECT PAGE SETUP AND SELECT LAYOUT TAB THERE CHECK THE OPTIONS.

<?section:force-page-count;'end-on-odd-layout'?>

<?section:force-page-count;'end-on-even-layout'?>

VARIABLE DECLARATION:

<?xdoxslt:set_variable($_XDOCTX,’A’,20)?>

<?xdoxslt:get_variable($_XDOCTX,’A’)?>

<?xdoxslt:get_variable($_XDOCTX,’A’)+1?>

TO_CHECK_NUMBER:

<?xdofx:to_check_number(12345.67,1)?>

<?xdofx:to_check_number(123,0)?>

<?xdofx:to_check_number(12345.67,’EUR’,’CASE_LOWER’,’DECIMAL_STYLE_WORDS’)?>

<?xdofx:to_check_number(12345.67,’JPY’,’CASE_UPPER’,’DECIMAL_STYLE_WORDS’)?>

ADD & SHOW PAGE TOTAL:


<?add-page-total:t;’SAL’?>
<?show-page-total:t?>

TEMPLATE HEADERS:

<?template:header?>

EMPLOYEE DETAILS

<?end template?> //WRITE THESE IN HEADER FORM AND CALL IN THE WORKING

<?call-template:header?> //WRITE THESE WHERE U NEED


CHOOSE

Ex: <?choose:?>

<?when: DEPTNO=1610?>

Abc

<?end when?>

<?when: DEPTNO=210?>

Kas

<?end when?>

<?otherwise:?>

Def

<?end otherwise?>

<?end choose?>

ARRAYS:

<?xdoxslt:set_array($_XDOCTX, ‘RAVI’, 2, ‘KANTH’)?>

<?xdoxslt:set_array($_XDOCTX,’RAVI’,1,’NERELLA’)?>

<?xdoxslt:get_array($_XDOCTX, ‘RAVI’, 1)?>

<?xdoxslt:get_array($_XDOCTX,’RAVI’,2)?>

INSERT IMAGES:

INSERT ANY IMAGE AS U WISH AND RIGHT CLICK ON IT SELECT FORMAT PICTURE IN THAT SELECT WEB TAB AND
ENTER

Ex: url:{'http:// oracleappsql.blogspot.com/'}

HYPERLINKS:

Hi: it is hyperlink right click on hi and select hyperlink in that select browed pages enter web site at run time we
can open it.
SQL Statement or XSL
Expression Usage Description

2+3 <?xdofx:2+3?> Addition

2-3 <?xdofx:2-3?> Subtraction

2*3 <?xdofx:2*3?> Multiplication

2/3 <?xdofx:2/3?> Division

2**3 <?xdofx:2**3?> Exponential

3||2 <?xdofx:3||2?> Concatenation

lpad('aaa',10,'.') <?xdofx:lpad('aaa',10,'.')?> The lpad function pads the left side of a


string with a specific set of characters.
The syntax for the lpad function is:
lpad(string1,padded_length,[pad_string])
string1 is the string to pad characters to
(the left-hand side).
padded_length is the number of
characters to return.
pad_string is the string that will be
padded to the left-hand side of string1 .

rpad('aaa',10,'.') <?xdofx:rpad('aaa',10,'.')?> The rpad function pads the right side of a


string with a specific set of characters.
The syntax for the rpad function is:
rpad(string1,padded_length,[pad_string]).
string1 is the string to pad characters to
(the right-hand side).
padded_length is the number of
characters to return.
pad_string is the string that will be
padded to the right-hand side of string1

decode('xxx','bbb','ccc','x <?xdofx:decode('xxx','bbb','ccc','x The decode function has the functionality


of an IF-THEN-ELSE statement. The
xx','ddd') xx','ddd')?> syntax for the decode function is:
decode(expression, search, result
[,search, result]...[, default])
expression is the value to compare.
search is the value that is compared
against expression.
result is the value returned, if expression
is equal to search.
default is returned if no matches are
found.

Instr('abcabcabc','a',2) <?xdofx:Instr('abcabcabc','a',2)?> The instr function returns the location of a


substring in a string. The syntax for the
instr function is:
instr(string1,string2,[start_position],[nth_a
ppearance])
string1 is the string to search.
string2 is the substring to search for in
string1.
start_position is the position in string1
where the search will start. The first
position in the string is 1. If the
start_position is negative, the function
counts back start_position number of
characters from the end of string1 and
then searches towards the beginning of
string1.
nth appearance is the nth appearance of
string2.

substr('abcdefg',2,3) <?xdofx:substr('abcdefg',2,3)?> The substr function allows you to extract


a substring from a string. The syntax for
the substr function is:
substr(string, start_position, [length])
string is the source string.
start_position is the position for
extraction. The first position in the string
is always 1.
length is the number of characters to
extract.
replace(name,'John','Jon' <?xdofx:replace(name,'John','Jon' The replace function replaces a sequence
) )?> of characters in a string with another set
of characters. The syntax for the replace
function is:
replace(string1,string_to_replace,[replace
ment_string])
string1 is the string to replace a sequence
of characters with another set of
characters.
string_to_replace is the string that will be
searched for in string1.
replacement_string is optional. All
occurrences of string_to_replace will be
replaced with replacement_string in
string1.

to_number('12345') <?xdofx:to_number('12345')?> Function to_number converts char, a


value of CHAR, VARCHAR2, NCHAR, or
NVARCHAR2 datatype containing a
number in the format specified by the
optional format model fmt, to a value of
NUMBER datatype.

to_char(12345) <?xdofx:to_char('12345')?> Use the TO_CHAR function to translate a


value of NUMBER datatype to
VARCHAR2 datatype.

to_date <?xdofx:to_date ( char [, fmt [, TO_DATE converts char of CHAR,


'nlsparam']] ) VARCHAR2, NCHAR, or NVARCHAR2
datatype to a value of DATE datatype.
The fmt is a date format specifying the
format of char. If you omit fmt,
then charmust be in the default date
format. If fmt is 'J', for Julian,
then char must be an integer.

sysdate() <?xdofx:sysdate()?> SYSDATE returns the current date and


time. The datatype of the returned value
is DATE. The function requires no
arguments.
minimum <?xdoxslt:minimum(ELEMENT_N Returns the minimum value of the
AME)?> element in the set.

maximum <?xdoxslt:maximum(ELEMENT_N Returns the maximum value of the


AME)?> element in the set.

chr <?xdofx:chr(n)?> CHR returns the character having the


binary equivalent to n in either the
database character set or the national
character set.

ceil <?xdofx:ceil(n)?> CEIL returns smallest integer greater than


or equal to n.

floor <?xdofx:floor(n)?> FLOOR returns largest integer equal to or


less than n.

round <?xdofx:round ROUND returns number rounded


( number [, integer ] )?> to integer places right of the decimal
point. If integer is omitted, then number is
rounded to 0 places. integer can be
negative to round off digits left of the
decimal point. integer must be an integer.

lower <?xdofx:lower (char)?> LOWER returns char, with all letters


lowercase. char can be any of the
datatypes CHAR, VARCHAR2, NCHAR,
NVARCHAR2, CLOB, or NCLOB. The
return value is the same datatype as char.

upper <?xdofx:upper(char)?> UPPER returns char, with all letters


uppercase. char can be any of the
datatypes CHAR, VARCHAR2, NCHAR,
NVARCHAR2, CLOB, or NCLOB. The
return value is the same datatype aschar.

length <?xdofx:length(char)?> The "length" function returns the length


of char. LENGTH calculates length using
characters as defined by the input
character set.
greatest <?xdofx:greatest ( expr [, expr]... GREATEST returns the greatest of the list
)?> of exprs. All exprs after the first are
implicitly converted to the datatype of the
first expr before the comparison.

least <?xdofx:least ( expr [, expr]... )?> LEAST returns the least of the list
of exprs. All exprs after the first are
implicitly converted to the datatype of the
first expr before the comparison.

The following table shows supported combination functions:

SQL Statement Usage

(2+3/4-6*7)/8 <?xdofx:(2+3/4-6*7)/8?>

lpad(substr('1234567890',5,3),10,'^') <?xdofx:lpad(substr('1234567890',5,3),10,'^')?>

decode('a','b','c','d','e','1')||instr('321',1,1) <?xdofx:decode('a','b','c','d','e','1')||instr('321',1,1)?>

XSL EQUIVALENTS

The following table lists the BI Publisher simplified syntax with the XSL equivalents.

Supported XSL Elements Description BI Publisher Syntax

<xsl:value-of select= "name"> Placeholder syntax <?name?>

<xsl:apply-templates Applies a template rule to the current element's child <?apply:name?>


select="name"> nodes.

<xsl:copy-of select="name"> Creates a copy of the current node. <?copy-of:name?>

<xsl:call-template Calls a named template to be inserted into/applied to the <?call:name?>


name="name"> current template.

<xsl:sort select="name"> Sorts a group of data based on an element in the dataset. <?sort:name?>

<xsl:for-each select="name"> Loops through the rows of data of a group, used to <?for-each:name?>
generate tabular output.

<xsl:choose> Used in conjunction with when and otherwise to express <?choose?>


multiple conditional tests.

<xsl:when test="exp"> Used in conjunction with choose and otherwise to express <?when:expression?>
multiple conditional tests

<xsl:otherwise> Used in conjunction with choose and when to express <?otherwise?>


multiple conditional tests

<xsl:if test="exp"> Used for conditional formatting. <?if:expression?>

<xsl:template name="name"> Template declaration <?template:name?>

<xsl:variable name="name"> Local or global variable declaration <?variable:name?>

<xsl:import href="url"> Import the contents of one stylesheet into another <?import:url?>

<xsl:include href="url"> Include one stylesheet in another <?include:url?>

<xsl:stylesheet xmlns:x="url"> Define the root element of a stylesheet <?namespace:x=url?>

USING FO ELEMENTS

You can use most FO elements in an RTF template inside the Microsoft Word form fields. The following FO
elements have been extended for use with BI Publisher RTF templates. The BI Publisher syntax can be used with
either RTF template method.
The full list of FO elements supported by BI Publisher can be found in the Appendix: Supported XSL-FO Elements.

FO Element BI Publisher Syntax

<fo:page-number-citation ref-id="id"> <?fo:page-number-citation:id?>

<fo:page-number> <?fo:page-number?>

<fo:ANY NAME WITHOUT ATTRIBUTE> <?fo:ANY NAME WITHOUT ATTRIBUTE?>

BI Publisher – How to use IF-Then -


Else Condition in rtf Template
posted in BI Publisher by prynkray
We have already seen how to use IF conditions in rtf.

But what happens when we have to use IF-THEN -ELSE conditions?


It could be used in the following way

Syntax of If else Condition is


<?xdoxslt:ifelse(condition,true,false)?>
Example:

<?xdoxslt:set_variable($_XDOCTX, ‘A’, 0)?>


<?xdoxslt:set_variable($_XDOCTX,’A’,xdoxslt:ifelse(xdoxslt:to_number(CS_VALUE)=’1′, 100,
200))?>
<?xdoxslt:get_variable($_XDOCTX,’A’)?>

Where CS_VALUE is a Summary column whose value is 1


A is a variable.
The above would print 100.

How to use if else condition in rtf template (BI Publisher)


Posted on March 1, 2012by Naveen Kumar

We can use if condition directly by writing <?IF?> condition <?END IF?>


But for If Else we need to use extended function

Syntax of If else Condition is


<?xdoxslt:ifelse(condition,true,false)?>
Ex: <?xdoxslt:ifelse(1=2,’yes 1 and 2 are equal’,’No 1 and 2 are not equal’)?>
Ans:No 1 and 2 are not equal

from the above example condition is 1=2 if the condition is true it will execute true part
else it executes False part

XML Tags (very important xml tags)


Posted on July 6, 2015by santosh kumar adda oracleapps
1.) Define Header some where in the page as per requirement. (call header )
<?Call:header?>
<?template: header?>
<?end template?>
——————————
2) For body Contents
<?start:body?>
<?end body?>
——————————
3)Last Page Only Content:
Insert the following syntax on the final page:
<?start@last-page:body?>
<?end body?>
——————————
4) Sort (Data sorting)
<?sort:trx_number?>
Sort descending
<?sort:trx_number;data-type=‘number’;order=‘descending’?>
multiple sort tags
<?sort:trx_number?><?sort:trx_date?&g
—————————–
Oracle Number Format Mask
<?format-number:fieldname;’999G999D99’?>
——————————
Mask Output for US Locale
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
4) Page Breaks:
<?split-by-page-break:?>
——————————
5)Arthemitical Calculated Fields:
<?field1 + field2?>
<?field1 – field2?>
<?field1 * field2?>
<?field1 / field2?>
——————————
6) Dynamic data columns:
Dynamic Column Header
<?split-column-header:group element name?>
Dynamic Column Data
<?split-column-data: group element name?>
——————————
7)Rows per page:
Define row counter variable in a form field
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
Increment counter for each line (again in a form field)
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
Break if the number of rows is reached (say 6 rows in this example)
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
——————————
8)Re-grouping XML Data:
Not limited by the structure of the data source
Use the tags
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
<?end for-each-group?>
Can establish nested groupings
<?for-each:current-group(); GROUPING-ELEMENT?>
<?end for-each-group?>
——————————
9)Conditional Cell Highlighting
Allows to conditionally highlight individual cells, columns, or rows in final
output.
<?if:XML_ELEMENT>Value?>
<xsl:attribute xdofo:ctx=”block” name=”background-color”>COLOR
</xsl:attribute>
<?end-if?>
——————————
10)Page totals:
Declare variable to hold page totals, following data element declaration
<?add-page-total:TotalFieldName;’element’?>
Display total field
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
——————————
11) If no data found message in a report
<?if:CS_CNT_ORD =0?>*************NO DATA FOUND*************<?end
if?>
——————————
12) SQL Functions
lpad function
<?xdofx:lpad(‘aaa’,10,’.’)?>
——————————
Concatenation Function
<?xdofx:3||2?>
——————————
rpad function
<?xdofx:rpad(‘aaa’,10,’.’)?>
trim function
<?xdoxslt:trim(‘ a ‘)?>
ltrim function
<?xdoxslt:ltrim(‘ a ‘)?>
rtrim function
<?xdoxslt:rtrim(‘ a ‘)?>
decode function
<?xdofx:decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)?>
Instr function
<?xdofx:Instr(‘abcabcabc’,’a’,2)?>
substr function
<?xdofx:substr(‘abcdefg’,2,3)?>
left function
<?xdoxslt:left(‘abcdefg’, 3)?>
right function
<?xdoxslt:right(‘abcdefg’, 3)?>
replace function
<?xdofx:replace(name,’John’,’Jon’)?>
to_number function
<?xdofx:to_number(‘12345’)?>
sysdate function
<?xdofx:sysdate()?>
<?xdofx:sysdate(‘dd-mon-yyyy’)?>
<?xdofx:sysdate(‘dd-mm-yyyy’)?>
<?xdofx:sysdate(‘day-dd-month-yyyy’)?>
lower
<?xdofx:lower (char)?>
upper
<?xdofx:upper(char)?>
length
<?xdofx:length(char)?>
——————————
Returns the minimum value of the element in the set
<?xdoxslt:minimum(ELEMENT_NAME)?>
Returns the maximum value of the element in the set.
<?xdoxslt:maximum(ELEMENT_NAME)?>
——————————
Copy the Current Node
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
——————————
xxx) Call Template
XSL Syntax: <xsl:call-template name=”name”>
BI Publisher Tag: <?call-template:name?>
xxx-1) Call Template – Template Declaration
XSL Syntax: <xsl:template name=”name”>
BI Publisher Tag: <?template:name?>
——————————
Import Stylesheet
XSL Syntax: <xsl:import href=”url”>
BI Publisher Tag: <?import:url?>
——————————–
Variables
Declaration and Assigning Value
<?xdoxslt:set_variable($_XDOCTX,‘variable name’, 0)?>
Variables -1
Sets the value of variable_name to the current value plus the element
amount
xdoxslt:set_variable($_XDOCTX,‘variable name’,
xdoxslt:get_variable($_XDOCTX,‘variable name’)+element name)
Variables -2
Get Value
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
Oracle Number Format Mask
<?format-number:fieldname;’999G999D99’?>
——————————
<?format-date:fieldname;’MASK’?>
Mask Output for US Locale
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
—————————–
for-each loop
<?for-each:XML group element tag name?>
<?end for-each?>
———————
IF Stament
– <?if:boolean_test?>
<?end if?>
<?if:LINE_TYPE=’LINE’ ?>
<?end if?>
——————————
Rows per page (Examples 6 rows per pages)
Define row counter variable in a form field
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
Increment counter for each line (again in a form field)
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
Break if the number of rows is reached (say 6 rows in this example)
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
——–****************************************
xdo user guied xml tags
Defining Groups?
<?for-each:XML group element tag name?>
<?end for-each?>
Defining body area?
Use the following tags to enclose the body area of your report:
<?start:body?>
<?end body?>
Images ?
url:{IMAGE_LOCATION}
url:{concat(SERVER,’/’,IMAGE_DIR,’/’,IMAGE_FILE)}
url:{concat(‘${OA_MEDIA}’,’/’,IMAGE_FILE)}
To change a shape’s size along the x or y axis, use:
<?shape-size-x:RATIO?>
<?shape-size-y:RATIO?>
To insert Page Break?
Page Breaks
<?split-by-page-break:?>
To insert Initial Page number in different page?
Initial Page Number
<?initial-page-number:pagenumber?>
To display contents in last page?
Last Page Only Content
<?start@last-page:body?>
<?end body?>
End on Even or End on Odd Page
<?section:force-page-count;’end-on-even-layout’?>
To end on an even page with layout
<?section:force-page-count;’end-on-even-layout’?>
To end on an odd page layout:
<?section:force-page-count;’end-on-odd-layout’?>
Generating Bookmarks in PDF Output
<?copy-to-bookmark:?>
directly above your table of contents and
<?end copy-to-bookmark:?>
Check Boxes implimention XDOUserGuide page no – 172.
Drop Down Lists
Conditional Formatting
<?if:VENDOR_NAME=’COMPANY A’?>
<?end if?>
If-then-Else Statements XDOUserGuide page no – 178.
Choose Statements
<?choose:?>
<?when:expression?>
<?otherwise?>
Column Formatting XDOUserGuide page no – 180.
Row Formatting XDOUserGuide page no – 183.
Conditionally Displaying a Row
Conditionally Highlighting a Row
Cell Highlighting
Displaying Page Totals
<?add-page-total:TotalFieldName;’element’?>
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
EG Oracle format mask (for example: C9G999D00)
Brought Forward/Carried Forward Totals XDOUserGuide page no – 191
<xdofo:inline-total
display-condition=”exceptfirst” <!–>
name=”InvAmt”>
Brought Forward: <!–>
<xdofo:show-brought-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
<xdofo:inline-total
display-condition=”exceptlast” <!–>
name=”InvAmt”>
Carried Forward: <!–>
<xdofo:show-carry-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
Running Totals
————–
Declares the “RTotVar”
variable and initializes it to 0.
<?xdoxslt:set_variable($_XDOCTX, ‘RTotVar’, 0)?>
Sets the value of RTotalVar to the current value plus the new Invoice
Amount.
Retrieves the RTotalVar value for display.
<?xdoxslt:set_variable($_XDOCTX, ‘xml_tag’,
xdoxslt:get_variable($_XDOCTX, ‘RTotVar’) +
xml_tag)?><?xdoxslt:get_variable($_XDOCTX, ‘RTotVar’)?>
Data Handling
Sorting
———-
<?sort:xml_tag?>
<?sort:xml_tag1?> <?sort:xml_tag2?><?sort:xml_tag2?>
Regrouping
———-
To regroup the data, use the following syntax:
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
Regrouping by an Expression
To establish nested groupings within the already defined group, use the
following
<?for-each:current-group(); GROUPING-ELEMENT?>
Using Variables
—————
Use the following syntax to declare/set a variable value:
<?xdoxslt:set_variable($_XDOCTX, ‘variable name’, value)?>
Use the following syntax to retrieve a variable value:
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
You can use this method to perform calculations.
<?xdoxslt:set_variable($_XDOCTX, ‘x’, xdoxslt:get_variable($_XDOCTX,
‘x’+1)?>
Defining Parameters
——————-
Declare the parameter in the template.
Use the following syntax to declare the parameter:
<?param@begin:parameter_name;parameter_value?>
parameter_name is the name of the parameter
parameter_value is the default value for the parameter (the
parameter_value is optional)

Setting Properties
Advanced Report Layouts
<?for-each@section:group name?>
where group_name is the name of the element for which you want to begin
a new
section.
For example, the for-each grouping statement for this example will be as
follows:
<?for-each@section:G_INVOICE?>
The closing <?end for-each?> tag is not changed.
Dynamic Data Columns
——————–
• Dynamic Column Header
<?split-column-header:group element name?>
• Dynamic Column <?split-column-data:group element name?>
• Dynamic Column Width
<?split-column-width:name?> or
<?split-column-width:@width?>
• Dynamic Column Width’s unit value (in points) <?split-column-width-
unit:
value?>
Defining Columns to Repeat Across Pages
<?horizontal-break-table:number?>
Number and Formatting
Using the Oracle Format Mask for Number
<?format-number:fieldname;’999G999D99′?>
Date Formatting
Using the Oracle Format Mask for Date
<?format-date:date_string;’ABSTRACT_FORMAT_MASK’;’TIMEZONE’?>
or
<?format-date-and-calendar:date_string;
‘ABSTRACT_FORMAT_MASK’;’CALENDAR_NAME’;’TIMEZONE’?>
or
<?format-date:hiredate;’YYYY-MM-DD’?>
Calendar and Timezone Support tags are avaliable
Using External Fonts
1. Copy the font to your <WINDOWS_HOME>/fonts directory.
Advanced Barcode Formatting
Register the Barcode Encoding Class
Advanced Design Options
Locating Data
Using XSL Elements
Apply a Template Rule
———————
Use this element to apply a template rule to the current element’s child
nodes.
XSL Syntax: <xsl:apply-templates select=”name”>
BI Publisher Tag: <?apply:name?>
This function applies to <xsl:template-match=”n”> where n is the element
name.
Copy the Current Node
———————-
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
Call Template
————-
Use this element to call a named template to be inserted into or applied to
the current
template. For example, use this feature to render a table multiple times.
XSL Syntax: <xsl:call-template name=”name”>
BI Publisher Tag: <?call-template:name?>
Template Declaration
——————–
Use this element to apply a set of rules when a specified node is matched.
XSL Syntax: <xsl:template name=”name”>
BI Publisher Tag: <?template:name?>
Variable Declaration
——————–
Use this element to declare a local or global variable.
XSL Syntax: <xsl:variable name=”name”>
BI Publisher Tag: <?variable:name?>
Example:
——–
<xsl:variable name=”color” select=”‘red'”/>
Assigns the value “red” to the “color” variable. The variable can then be
referenced in
the template.
Import Stylesheet
—————–
Use this element to import the contents of one style sheet into another.
Note: An imported style sheet has lower precedence than the importing
style sheet.
XSL Syntax: <xsl:import href=”url”>
BI Publisher Tag: <?import:url?>
Define the Root Element of the Stylesheet
—————————————–
This and the <xsl:stylesheet> element are completely synonymous
elements. Both are used to define the root element of the style sheet.
Note: An included style sheet has the same precedence as the including
style sheet.
XSL Syntax: <xsl:stylesheet xmlns:x=”url”>
BI Publisher Tag: <?namespace:x=url?>
Native XSL Number Formatting
Extended Function Support in RTF Templates
Extended SQL and XSL Functions
==========================================
2+3 <?xdofx:2+3?> Addition
2-3 <?xdofx:2-3?> Subtraction
2*3 <?xdofx:2*3?> Multiplication
2/3 <?xdofx:2/3?> Division
2**3 <?xdofx:2**3?> Exponential
3||2 <?xdofx:3||2?> Concatenation
———————————————
lpad(‘aaa’,10,’.’)
<?xdofx:lpad(‘aaa’,10,’.’)?>
lpad(string1,padded_length,[pad_string])
———————————————
rpad(‘aaa’,10,’.’)
<?xdofx:rpad(‘aaa’,10,’.’)?>
rpad(string1,padded_length,[pad_string])
———————————————
decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)
<?xdofx:decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)?>
decode(expression, search, result[,search, result]…[, default])
—————————————————————–
Instr(‘abcabcabc’,’a’,2)
<?xdofx:Instr(‘abcabcabc’,’a’,2)?>
instr(string1,string2,[start_position],[nth_appearance])
——————————————————–
substr(‘abcdefg’,2,3)
<?xdofx:substr(‘abcdefg’,2,3)?>
substr(string, start_position,[length])
———————————————
replace(name,’John’,’Jon’)
<?xdofx:replace(name,’John’,’Jon’)?>
replace(string1,string_to_replace,[replacement_string])
——————————————————-
to_number(‘12345’) <?xdofx:to_number(‘12345’)?>
———————————————-
to_char(12345) <?xdofx:to_char(‘12345’)?>
———————————————–
to_date <?xdofx:to_date ( char [, fmt [,’nlsparam’]] )
———————————————–
sysdate() <?xdofx:sysdate()?>
—————————————————-
minimum
<?xdoxslt:minimum(ELEMENT_NAME)?>
Returns the minimum value of the element in the set.
—————————————————-
maximum
<?xdoxslt:maximum(ELEMENT_NAME)?>
Returns the maximum value of the element in the set.
—————————————————-
chr <?xdofx:chr(n)?>
—————————————————-
ceil <?xdofx:ceil(n)?>
—————————————————-
round <?xdofx:round ( number [, integer ])?>
—————————————————-
lower <?xdofx:lower (char)?>
LOWER returns char, with all letters lowercase
—————————————————-
upper <?xdofx:upper(char)?>
UPPER returns char, with all letters uppercase.char can be any of the
datatypes CHAR,VARCHAR2, NCHAR, NVARCHAR2, CLOB,or NCLOB
—————————————————-
length <?xdofx:length(char)?>
The “length” function returns the length of char
—————————————————-
greatest <?xdofx:greatest ( expr [, expr]… )?>
GREATEST returns the greatest of the list of exprs
—————————————————-
least <?xdofx:least ( expr [, expr]… )?>
LEAST returns the least of the list of exprs.

Query to find xml template and data definitions:


select b.concurrent_program_name,
c.user_concurrent_program_name,
b.output_file_type,
e.executable_name,
e.execution_file_name,
e.execution_method_code,
a.application_short_name ,
a.data_source_name “DATA DEFINITION NAME”,
a.data_source_code “DATA DEFINITION CODE”,
d.template_name “TEMPLATE NAME”,
d.template_code “TEMPLATE CODE”,
d.template_type_code,
d.default_language,
d.default_territory,
f.file_name
from xdo_ds_definitions_vl a,
fnd_concurrent_programs b,
fnd_concurrent_programs_tl c,
xdo_templates_vl d,
fnd_executables e,
xdo_lobs f
where a.data_source_code = b.concurrent_program_name
and b.concurrent_program_id = c.concurrent_program_id
and a.data_source_code = d.data_source_code
and e.executable_id = b.executable_id
and f.lob_code = d.template_code
and a.application_short_name = ‘FND’
and b.concurrent_program_name like ‘FNDSCURS’
and e.EXECUTION_METHOD_CODE like ‘P’
and f.file_name like ‘%.rtf’
ORDER BY EXECUTION_FILE_NAME

—————————————————————————-
–***********************************************************
—————————————————————————
Xml Interview FAQ
1. What is BI Publisher? Ans. It is a reporting tool for generating the reports.
More than tool it is an engine that can be integrated with systems
supporting the business. 02. Is BI Publisher integrated with Oracle Apps?
Ans. Yes, it is tightly integrated with Oracle Apps for reporting needs. In
11.5.10 instances xml publisher was used, in R12 we can it BI Publisher 03.
What is the difference between xml publisher and BI Publisher? Ans. Name is
the difference, initially it was released on the name of xml publisher ( the initial
patchset), later on they have added more features and called it Business
Intelligence Publisher. In BI by default we have integration with Data
Definitions in R12 instance. Both these names can be used interchangeably 04.
What are the various components required for developing a BI publisher
report? Ans. Data Template,
Layout template and
the integration with Concurrent Manager.
5. How does the concurrent program submitted by the user knows about the data
template or layout template it should be using for generating the output? Ans.
The concurrent program ‘shortname’ will be mapped to the ‘code’ of the
Datatemplate.
Layout template is attached to the datatemplate; this forms the mapping
between all the three. 06. What is a datatemplate? Ans. Datatemplate is
an xml structure which contains the queries to be run against the database
so that desired output in xml format is generated, this generated xml output
is then applied on to the layout template for the final output. 07. What is a
layout template? Ans. Layout template defines how the user views the
output, basically it can be developed using Microsoft word document in rft
(rich text format) or Adobe pdf format.
The data output in xml format (from Data template) will be loaded in layout
template at run time and the required final output file is generated. 08.
What are the output formats supported by layout template? Ans. xls, html,
pdf, eText etc are supported based on the business need. 09. Do you need to
write multiple layout templates for each output type like html/pdf? Ans.
No, only layout template will be created, BI Publisher generates desired
output format when the request is run 10. What is the default output format
of the report? Ans. The default output format defined during the layout
template creation will be used to generate the output, the same can be
modified during the request submission and it will overwrite the one
defined at layout template 11. Can you have multiple layout templates for a
singe data template? Ans. Yes, multiple layouts can be defined; user has a
choice here to use one among them at run time during concurrent request
submission.
12. Where do you register data and layout templates? Ans. Data template will be
registered under xml publisher administrator responsibility> Data Definitions
Layout template will be registered under xml publisher administrator
responsibility>Templates tab. 13. I want to create a report output in 10
languages, do I have to create 10 layout templates? Ans. No, BI Publisher
provides the required translation for your templates, based on the number of
languages installed in your oracle apps environment requires outputs are
provided 14. What is the required installation for using BI Pub report? Ans. BI
Publisher Desktop Tool has be installed. Using this tool you can preview or test
the report before deploying the same on to the instance. 15. How do you move
your layout or data template across instances? Ans. xdoloader is the utility
that will be used. 16. What is the tool to map required data output and layout
templates so that they can be tested in local machine? Ans. Template viewer
will be used for the same. 17. Which component is responsible for generating
the output in xml format before applying it to layout template? Ans. Data
Engine will take Data Template as the input and the output will be generated in
xml format which will then be applied on layout template 15. Can BI publisher
reports be used in OAF pages? Ans. XDO template utility helper java classes
are provided for the same. 16. Name some business use cases for BI reports?
Ans. Bank EFT, customer documents, shipping documents, internal analysis
documents or any transactional documents 17. How do you pass parameters to
your report? Ans. Concurrent program parameters should be passed, ensure
that the parameter name/token are same as in the conc prog defn and the data
template 18. What are the various sections in the data template? Ans.
Parameter section Trigger Section Sql stmt section Data Structure
section Lexical Section
13. What does lexical section contain? Ans. The required lexical clause of Key
Flex field or Descriptive FF are created under this section 20. What triggers
are supported in Data template? Ans. Before report and After report are
supported 21. Where is the trigger code written? Ans. The code is written
in the plsql package which is given under ‘defaultpackage’ tag of data template.
22. What is the file supporting the translation for a layout template? Ans. xliff
is the file that supports the translation, you can modify the same as required.
23. How do you display the company logo on the report output? Ans. Copy and
paste the logo (.gif. or any format) on the header section of .rtf file . Ensure you
resize per the company standard

You might also like