You are on page 1of 18

Table of Contents

Table of Contents.................................................................1
XML Standards for XML / BI Publisher for Oracle.....................2
XML - Extensible Markup Language........................................2
Output Formats....................................................................2
Moving Templates and Data Definitions.................................3
FNDLOAD to Manage Metadata..............................................3
XML Publisher FNDLOAD File Structure:.................................3
Downloading Metadata.........................................................3
XDOLoader to Manage Files...................................................4
Moving Files.........................................................................4
Oracle Report to XML/ BI Publisher Report migration .............5
Overview:...................................................................................5
Process:.....................................................................................6
Data Model Migration:..........................................................................................6
Layout Migration:..................................................................................................7
Known Issues:............................................................................8
Batch Conversion:.......................................................................8
XML Publisher Naming Convention.........................................9
Layout/ RTF Template.................................................................9
Data Definition/ Data Template..................................................10
BI Publisher Standalone Naming Convention........................10
XML/ BI Publisher Best Practices..........................................11
Report Architecture...................................................................11
Data Extraction & Processing/ Layout or Template......................12
Data Sources and Templates..............................................................................12
Oracle BI Publisher EE (Standalone Server)..........................13
Best Practices for Layout Template......................................16
RTF Template Best Practice.................................................17
Tuning...............................................................................18
XML Standards for XML / BI Publisher for Oracle

XML - Extensible Markup Language

• Describes data objects called XML documents


• Is composed of markup language for structuring data
• Supports custom tags for definition, transmission, validation,
and interpretation of data
• Conforms to Standard Generalized Markup Language (SGML)
• Has become a standard way to
describe data on the Web
• Is processed by XML processors

Example: A Simple XML Page

<?xml version=”1.0”?>
<employees>
<employee>
<employee_id>120</employee_id>
<last_name>Weiss</last_name>
</employee>
<employee>
<employee_id>160</employee_id>
<last_name>Laura</last_name>
</employee>
</employees>

Output Formats

• Oracle BI Publisher supports the following formats:


– Rich text format (RTF)
– Portable document format (PDF)
– eText (used with Electronic Data Interchange [EDI] or
Electronic Funds Transfer [EFT]
Output Formats:
RTF is a standard maintained by Microsoft. You can learn more about it at:
PDF was created by Adobe. You can learn more about it at:
PDF standards, in multiple output format (e.g. print-based PDFs vs. electronic
PDFs), are currently being submitted and accepted as standards to the ISO
(International Standards Organization). You can find more about their published
standards at: http://www.iso.org/
For information on XML, XSL, XSL-FO, and XPath, those standards are
maintained by the World Wide Web Consortium (W3C). You can find them at:
http://www.w3c.org/
Moving Templates and Data Definitions
XML Publisher stores the metadata and physical files for templates and data
definitions in BLOB columns in its schema. During testing and development you
commonly must download information from a development instance to a test
instance and then to a production environment.
• Use the FNDLOAD utility to upload and download the data definition
information and the template metadata stored in the Template
Manager.
• Use the XDOLoader utility to upload and download the physical files
(RTF, PDF, XSL-FO, XML, and XSD).

FNDLOAD to Manage Metadata


Because both templates and data definitions are stored in the database, you can use
the FNDLOAD loader to download the metadata for these objects and then to upload
this metadata to another instance. The FNDLOAD program requires a control file (lct)
that XML Publisher provides for use with its objects. The file is called xdotmpl.lct and
it is located under your APPL_TOP directory as follows:

XDO_TOP/patch/115/import/xdotmpl.lct

XML Publisher FNDLOAD File Structure:

DO_DS_DEFINITIONS – attributes for data source


| KEY APPLICATION_SHORT_NAME
| KEY DATA_SOURCE_CODE
|
X_TEMPLATES – attributes for templates
| KEY TMPL_APP_SHORT_NAME
| KEY TEMPLATE_CODE
|
X_TEMPLATE_FIELDS – template fields
| KEY FIELD_NAME

Downloading Metadata
The FNDLOAD command takes the following format:
FNDLOAD usr/pwd@db 0 Y DOWNLOAD|UPLOAD <full path to xdotmpl.lct>
targetldtfile.ldt XMLP ATTRIBUTES

For example, to download all data definitions and templates for Accounts Receivable,
use the following command:
FNDLOAD apps/apps@mydb 0 Y DOWNLOAD
$XDO_TOP/patch/115/import/xdotmpl.lct
XMLPData.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=AR
XDOLoader to Manage Files
The XDOLoader utility is a Java-based command line program to load template (RTF,
PDF, and XSL-FO), XML, and XSD files to the XML Publisher database tables. Use this
utility to download files from one instance and load to another. Note: The XDOLoader
currently cannot handle XLIFF files. The XDOLoader has two modes
• File download only mode
• File download and LDT/DRVX generation mode

The XDOLoader has two modes:


• File download only mode
Use this mode to download files from the XDO_LOBS table. Specify the target
LOB_CODE, APPS_SHORT_NAME, and LOB_TYPE, LANGUAGE, and TERRITORY to
download all files that match the criteria.
• File download and LDT/DRVX generation mode
Use this mode to download files from the XDO_LOBS tables and create and LDT file
for the downloaded file. Note: A DRVX file is also created. This file is used by Oracle
Development to load templates during patch application. It is not required for use at
your site and can be ignored.

Moving Files
To upload/download the files, first set up your environment for your session by
setting the APPL_TOP and CLASSPATH.

Execute the XDOLoader utility as follows:

java oracle.apps.xdo.oa.util.XDOLoader UPLOAD/DOWNLOAD \


-DB_USERNAME <db_username> \
-DB_PASSWORD <db_password> \
-JDBC_CONNECTION <jdbc_con_string> \
-LOB_TYPE <lob_type> \
-APPS_SHORT_NAME <application_short_name> \
-LOB_CODE <lob_code> \
-LANGUAGE <language> \
-TERRITORY <territory> \
-LOG_FILE <log file>

The parameters are described in the following table:


Parameter Name Description
DOWNLOAD (Mandatory) The first parameter:
DOWNLOAD will be implemented in the
feature.
DB_USERNAME (Mandatory) Database user name
(example:apps).
DB_PASSWORD (Mandatory) Database user password
(example: manager).
JDBC_CONNECTION (Mandatory) JDBC database connection
string (example: ap000sun:1521:db222).
LOB_TYPE (Mandatory) XDO LOB type. Valid values
are: TEMPLATE
XML_SCHEMA
XML_SAMPLE
APPS_SHORT_NAME (Mandatory) Application short name
(example: AR).
LOB_CODE (Optional) XDO LOB code. Enter either
the Template Code or the Data Definition
Code.
LCT_FILE (Optional) This is the control file for XML
Publisher metadata.
LANGUAGE (Mandatory for template files only) ISO
two-letter language code (example: en)
TERRITORY (Mandatory for template files only) ISO
two-letter territory code (example: US)
LOG_FILE (Optional) Enter a file name for the
uutput log file (default: xdotmpl.log).
DEBUG (Optional) Turns debug on or off. Valid
values are:
true
false (default)

The parameters LOB_CODE and LCT_FILE are optional, but one must be defined as
follows:
• LOB_CODE - use this parameter to download an individual template.
• LCT_FILE - if you do not define an LOB_CODE then this parameter is required. If
you want to download multiple templates, then you must provide the LCT file. The
loaded needs this file to retrieve the templates. The LCT file can be found under
$XDO_TOP/patch/115/import/xdotmpl.lct. When you use this option you will not
only get the templates, but the ldt file for the templates will be generated for you
as well.

Oracle Report to XML/ BI Publisher Report migration

Overview:
This document describes the usage of XML Publisher report migration APIs and
necessary guidelines for report migration process.

In Oracle Report the Data Model (data extraction logic) and Layout
(presentation), both are embedded together as an rdf file. In XML Publisher both of
these layers are separated; the migration is two step processes. Data Model
migration and Layout migration. These can be combined into a single shell script to
convert an Oracle Report. The shell script can be modified to convert all Oracle
Reports in a given directory.
The overall flow is as follows:
1. Run the conversion utility.
2. Load the PL/SQL package into the database.
3. Upload the report to the Oracle BI Publisher repository.(Exclusively For
Oracle BI Publisher – Standalone)
4. Register the Data Template and Layout Template using XML Administrator
Responsibility (Oracle EBS)
5. Test the report and check the conversion log files to identify any manual
modifications needed to complete the conversion (It can be done for both XML / BI
Publisher reports).

XMLP SupportingPL
Oracle Oracle Data /SQL
Reports Reports Template
10g 10g
RDF RDF-XML
XMLP
RTF
Templates
Pre-Requisites:
The migration APIs accept an Oracle Report in XML Format, this format is only
supported in Oracle Reports 9i and above. For R12 the Oracle Reports version in the
techstack is 10.1.3 so the conversion to RDF XML is straightforward. For Release 12
the version is 10g.
To get the Oracle Report in XML format from rdf format, either use Oracle Report
Designer or Oracle Report rwconverter.exe utility under $ORACLE_HOME/bin

Example:

D:\Oracle_home\BIN>rwconverter batch=yes source= h:\reports\raxinv.rdf dest=


h:\reports\raxinv.xml dtype=xmlfile overwrite=yes

This will convert the binary RDF file into an RDF-XML format that can then be
consumed by the conversion APIs.
Update the Class Path with Required JAR Files:
To run the conversion utilities you need the following files defined in your
class path:
• Collections. zip
• xmlparserv2-904.jar
• xdocore.jar
• aolj.jar

For Oracle E-Business Suite, these libraries or the corresponding classes are
available under JAVA_TOP.

For Oracle BI Publisher Enterprise, all these libraries are available under WEB-
INF\lib.

A sample path to WEB-INF\lib is as follows:


C:\Oracle\bi\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\WEB-
INF\lib

Process:

Data Model Migration:


Use DataTemplate Generator API to migrate the Oracle Reports Data Model to
a DataTemplate and associated PL/SQL logic to PL/SQL Package (specification and
body).

The API can be called through the command line or through a shell script. This will
generate following output files.
• DataTemplate (REPORT.xml)
• Default PL/SQL package specification (REPORTS.pls)
• Default PL/SQL package body (REPORTB.pls).

Example :
javaw.exe oracle.apps.xdo.rdfparser.DataTemplateGenerator H:\report\raxinv.xml

Output files

PL/SQL Package:H:\ report\raxinvS.pls

PL/SQL Body:H:\report\raxinvB.pls

DataTemplate:H:\report\raxinv_template.xml

Layout Migration:
Use RTFTemplateGenerator API to migrate the Oracle Reports layout to an
XML Publisher RTF template.
Since there is no support of PL/SQL in RTF Template, the process does not
migrate any format trigger logic present in the report. Instead the generator writes
all the format trigger code to log file. You will need to implement any corresponding
PL/SQL logic as XSL code. The majority of Oracle Reports use simple ‘if’ formatting
logic that can be converted relatively easily. To aid in this process, the resulting RTF
template will contain formfields that hold the format trigger names that are called,
these fields will be highlighted in red. You can then refer to the log to find the actual
PL/SQL code used in the original Oracle Report.

The API can be called through the command line or through a shell script. This
will generate following output files.
• RTF Template
• Log file

Example :
javaw.exe oracle.apps.xdo.rdfparser.RTFTemplateGenerator
H:\report\raxinv.xml

Output files

RTF Template: H:\ report\ raxinv.rtf

Log File : H:\report\raxinv.log

Uploading the PL/SQL Package to the Database:

The converted Oracle Reports will generate a PL/SQL package specification file
and a PL/SQL package body file as follows:
• <report_name>S.pls
• <report_name>B.pls

Run the PL/SQL package files against your Oracle Database as follows. This
will create the PL/SQL package specification and body.
SQL> @C:\BIPublisher_reports\ARinvoice\ raxinvS.pls
SQL> @C:\BIPublisher_reports\ARinvoice\ raxinvB.pls

Register the Converted Report in Oracle EBS:


Register the converted report i.e. Data Template and Layout Template in
Oracle EBS thru Oracle XML Administrator Responsibility with Admin Privileges.

Once registered, attach the XML Report Publisher to the corresponding


Request Group of the Application (Report Conversion) thru Sys-Admin responsibility.

Moving Converted Reports to the Oracle BI Publisher Reports


Repository:

Moving the converted reports to the Oracle BI Publisher repository is a two-


step process:
1. Copy the report folders into the repository.
2. Refresh the repository metadata.

If the converted reports (Whole Reports Folder) are of a file-based repository,


copy the report folder structure to the file system.

Example, suppose repository path was set to: C:\oracle\bi\xmlp\XMLP

Simply copy the report directory and all its files to the desired folder structure
in the existing report repository.

Example: > copy C:\BIPublisher_reports\invoice C:\oracle\bi\xmlp\XMLP\Shared


Folders\Converted reports

Once loaded report directories into the repository, log on to Oracle BI


Publisher with administrator privileges and select "Refresh Metadata" from the
System Maintenance Section of the Oracle BI Publisher Admin page. Now all reports
should be available for testing and execution.

Known Issues:
1. Some times, because of complexity of Oracle Report the, Data Template or
PL/SQL has some minor errors and requires manual correction.
2. Format triggers are not supported. The format trigger logic should be
implemented separately though XSLT

3. If formula column reference the summary column as parameter and the


summary column belongs to same Data Source/Data Query, this
implementation is not supported in Data Template. This is because of all the
formula columns moved to select statement and the summary column value is
not available while executing the formula.

Batch Conversion:
The three components to the migration can be combined into a single shell
script to completely automate the process. Furthermore, rather than just have the
script run on a single report file, the script can be modified to run on all the reports in
a given directory.
This script will convert all RDFs in a directory. You will need a few java libraries:
1. Collections.zip – available from Sun
2. xmlparserv2-904 – available from the JAVA_TOP directories
3. A pointer to the Apps JAVA_TOP – under here are the necessary XML
Publisher libraries

Sample Shell Script:


#!/bin/sh
# This script will generate a report for each template in the current directory
# Create a variable to hold the classpath
classpath="$UTIL_TOP/collections.jar:$UTIL_TOP/xmlparserv2.jar:
$UTIL_TOP/xdocore.jar:$UTIL_TOP/aolj.jar:$JAVA_TOP"
if [ $# -eq 0 ]
then
for file in *.rdf
do
echo "Processing ... $file"
if test -f $file
then
# Convert the rdf to xml
echo yes | $ORACLE_HOME/rwconverter.sh batch=yes source=$file dest=$file
dtype=xmlfile overwrite=yes; \
#Create a variable to hold the new xml file name, this is just a simple replace
statement
xfile="${file//rdf/xml}";
# Generate the data template plus plsql
echo yes | $JAVA_TOP/java -classpath $classpath
oracle.apps.xdo.rdfparser.DataTemplateGenerator $xfile;
# Generate the RTF template
echo yes | $JAVA_TOP/java –classpath $classpath
oracle.apps.xdo.rdfparser.RTFTemplateGenerator $xfile;
fi
done
else
echo usage: $0
echo this script will generate a data template and supporting plsql and an RTF
template in the current directory
fi

XML Publisher Naming Convention

The below mentioned are the XML Publisher Naming Conventions to follow in
development for the creation of Layout Templates, Data Definitions.

Layout/ RTF Template


Name: Unique & Mandatory (Use the Concurrent Program Name)
Code: Unique & Mandatory (Use the Concurrent Program Short Name)
Application: Mandatory (Use Appropriate Application to register the
Template)
Data Definition: Mandatory (Use Appropriate Data Definition Defined)
Type: Mandatory (Use the type from the list of values ex. RTF, PDF, EXCEL.)
Start Date: Mandatory (Use the System Date)
Description: Optional (Use description for better understanding)
Template File:
File: Unique & Mandatory (Use the Concurrent Program Short Name)
_RTF, _PDF, _XLS as postfix for the file name as per the ‘Type’ selection, use
.rtf, .pdf, .xls as the corresponding file extensions
Language: Mandatory (English)
Territory: Mandatory (United States (US))

Example:
Name: KC Statement Generation Program
Code: XXARXSGP
Application: Receivables
Data Definition: KC Statement Generation Program
Type: RTF
Start Date: 16-MAR-2010
Description: KC Customer Statement Generation Program
Template File:
File: XXKCCUST_STMT_RTF.rtf
Language: English
Territory: US

Data Definition/ Data Template


Name: Unique & Mandatory (Use the Concurrent Program Name)
Code: Unique & Mandatory (Use the Concurrent Program Short Name)
Application: Mandatory (Use appropriate Application to register the Data
Definition)
Start Date: Mandatory (Use as of System date)
Description: Optional (Use description for better understanding)
Data Template/ Definition File:
Data Template: use _DT.xml as postfix for the file name
Bursting Control File: use _BC.xml as postfix for the file name
Preview Data: use _DATA.xml as postfix for the file name

Example:
Name: KC Statement Generation Program
Code: XXARXSGP
Application: Receivables
Start Date: 16-MAR-2010
Description: KC Customer Statement Generation Program
Data Template/ Definition File:
Data Template: XXARXSGP_DT.xml
Preview Data: XXARXSGP_DATA.xml

BI Publisher Standalone Naming Convention

The below mentioned are the BI Publisher(Standalone) Naming Conventions to follow


in development for the creation of Layout Templates, Data Definitions.

Report:

Data Model:
General Settings:
Name: Mandatory (Use Short Name)
Type: Mandatory, Select the List of Values based on the Requirement
SQL Query: Use Upper cases for all the Conditional Statements
like SELECT, FROM, WHERE, AND etc.
Data Template: Use the mentioned structure
<dataTemplate>
<dataQuery>
</dataQuery>
</dataTemplate>
File: Use the Report Name as the file name and keep it short
for flexibility and understanding, file extension with .xml
List of Values:
General Settings:
Name: Mandatory (Use Short Name and end with _LOV)
Type: Mandatory, Select the List of Values based on the Requirement
SQL Query: Use Upper cases for all the Conditional Statements
like SELECT, FROM, WHERE, AND etc.
Fixed Data: Add the Values (Use Upper Case for Label and
Values Should Start with Upper Case Letter and the rest lower
case letters
Parameters:
General Settings:
Identifier: Mandatory (Start with P_<Parameter Name>)
Data Type: Mandatory (Select from the List of Values)
Default Value: Optional
Parameter Type: Mandatory (Select from the List of Values)

Layout:
General Settings:
Name: Mandatory (Use Short Name and postfix with _RTF, _PDF, _XLS
and file extension as .rtf, .pdf, .xls)
Template: If Exists that will be defaulted, otherwise defaulted to the
newly created
Template Type: Mandatory (Select from the List of Values ex. RTF,
PDF, EXCEL)
Output Format: Mandatory (Select from the Radio Button Selection)
Bursting:
General Settings:
Enable Bursting: Mandatory (Select the Check Box Option)
Split By: Conditional (Based on the List of Values Defined)
Deliver By: Conditional (Based on the List of Values Defined)

XML/ BI Publisher Best Practices

Report Architecture

Separate layout & translation from data logic. This allows for greater flexibility
with report layouts, report maintenance, and optimization of the data extraction and
document generation process.
Data Extraction & Processing/ Layout or Template

Data Sources and Templates

Oracle EBS:
Data Source Type:
Data Template
File (XML)

Data Template:
Join and Structure data that reside on different systems & disparate data
sources
Best Practices for Large Data Sets
• Push Expensive joins to the database
• Generate XML data that are optimized for processing
o Sort Data (preferably at the source)
o Structure Data
o Pre-calculate group-level and report-level aggregate functions
• Take advantage of Before Report Triggers

Example Data Template:

-<dataTemplate name=”dataTemplateName”
description=”Template Description”
defaultPackage=”employee” version=”1.0”>
-<parameters>
<parameter name=”departments”
dataType=”character” defaultValue=”10”/>
</parameters>
-<dataQuery>
<sqlStatement name=’Q1”>
SELECT EMPNO, ENAME from emp where
deptno=:department
</sqlStatement>
</dataQuery>
-<dataTrigger name=”deforeReport”
source=”employee.beforeReportTrigger”/>
-<dataStructure>
-<group name=”G_EMPLOYEE” source=”Q1”>
<element name=”Employee_Number”
value=”EMPNO”/>
<element name=”Name” value=”ENAME”/>
</group>
</ dataStructure>
</ dataTemplate>

File (XML):

<?xml version=”1.0”?>
<employees>
<employee>
<employee_id>120</employee_id>
<last_name>Weiss</last_name>
</employee>
<employee>
<employee_id>160</employee_id>
<last_name>Laura</last_name>
</employee>
</employees>

Oracle BI Publisher EE (Standalone Server)

Data Source Type:


• SQL Query -Submit a SQL query against any of the transactional databases set up
by Admin. BI Publisher also provides a Query Builder that enables to build SQL
query graphically.
• HTTP (XML Feed) - Use an RSS feed off the Web that returns XML.
• Web Service - Supply the Web service WSDL to BI Publisher and then define the
parameters in BI Publisher to use a Web service to return data for report.
• Data Template - The BI Publisher data engine enables you to rapidly generate any
kind of XML data structure against any database in a scalable, efficient manner.
The data template is the method by which to communicate the request for data
to BI Publisher's data engine.
• Oracle BI Answers - If you have integrated your BI Publisher installation with
Oracle Business Intelligence Presentation Services, then you can use the data
from an Oracle BI Answers request to create your report.
• Oracle BI Discoverer - If you have integrated your BI Publisher installation with
Oracle Discoverer, then you can use the data from an Oracle Discoverer
worksheet to create your report.
• File - Use a pregenerated XML data file stored in a directory that has been set up
by Administrator.
• MDX Query - Construct a multidimensional (MDX) query against an OLAP
database that has been set up by Administrator.

Connection Type:
JDBC
JNDI (Recommended, can take advantage of connection pooling)

Data Template:
Join and Structure data that reside on different systems & disparate data sources
Best Practices for Large Data Sets
• Push Expensive joins to the database
• Generate XML data that are optimized for processing
o Sort Data (preferably at the source)
o Structure Data
o Pre-calculate group-level and report-level aggregate functions
• Take advantage of Before Report Triggers

Example Data template:

<dataTemplate name=”dataTemplateName” description=”Template


Description” defaultPackage=”employee” version=”1.0”>
-<parameters>
<parameter name=”departments” dataType=”character”
defaultValue=”10”/>
</parameters>
-<dataQuery>
<sqlStatement name=’Q1”>
SELECT EMPNO, ENAME from emp where deptno=:department
</sqlStatement>
</dataQuery>
-<dataTrigger name=”deforeReport”
source=”employee.beforeReportTrigger”/>
-<dataStructure>
-<group name=”G_EMPLOYEE” source=”Q1”>
<element name=”Employee_Number”
value=”EMPNO”/>
<element name=”Name” value=”ENAME”/>
</group>
</ dataStructure>
</ dataTemplate>

SQL Query:

Enter the SQL Query or Use Query Builder to build the SQL Query.

Using the Query Builder -

Three Sections: Object Selection Pane, Design Pane displays the selected object
from the Object Selection Pane, and Output Pane allows creating conditions, to view
the generated SQL and Result of the Query.
File (XML):

<?xml version=”1.0”?>
<employees>
<employee>
<employee_id>120</employee_id>
<last_name>Weiss</last_name>
</employee>
<employee>
<employee_id>160</employee_id>
<last_name>Laura</last_name>
</employee>
</employees>

Web Service (WSDL):

BI Publisher supports document/literal Web service data sources that return the
following data types:
• String
• Boolean
• dateTime
• decimal
• integer

Tip: If the WSDL URL is outside of your company firewall you must start the BI
Publisher sever using proxy parameters.

BI Publisher supports Web services that return both simple data types and complex
data types. You must make the distinction between simple and complex when you
define the Web service data model.

Note that if you want to include parameters for the Web service method, you must
define the parameters first, so that they are available for selection when setting up
the data source. Multiple parameters are supported. Ensure the method name is
correct and the order of the parameters matches the order in the method.

Note that only parameters of simple type are supported, for example, string and
integer.
• Enter the WSDL URL and the Web Service Method.
Important: Only document/literal Web services are supported.
• To specify a parameter, select the Add link. Select the parameter
from the list.
Note: The parameters must already be set up in the Parameters section of
the report definition

Element Naming:
Avoid re-using the same name for element names. This does sometimes make
sense – for example CITY under SHIPPING_ADDRESS and BILLING_ADDRESS. But in
many cases you are better of using different names.
Use short element names to reduce the XML file size.

Null Elements and XML Attributes:

Avoid generating empty tags in the XML


 Missing Fields do not cause an issue with XSL – for example a
print statement will just return an empty string
 Summations over fields that contain empty tags will fail with a
“not a number” exception

Avoid using XML attributes, they are supported but are more complicated to
use in the Template Builder for word

Best Practices for Layout Template

Supported Modes:
XML Publisher supports two methods for creating RTF templates:
• Basic RTF Method
• Use any word processing application that supports RTF version 1.6 writer (or
later) to design a template using XML Publisher's simplified syntax.
• Form Field Method
• Using Microsoft Word's form field feature allows you to place the syntax in
hidden form fields, rather than directly into the design of your template.

Note: If you use XSL or XSL:FO code rather than the simplified syntax, you
must use the form field method.

Document Formatting and Layout:

Oracle EBS:
Oracle XML Publisher supports the following three Layout Template Types in Oracle
EBS.

Layout Document Formatting


RTF • Microsoft Word documents are marked up with XSL Code
Templates (Standards XSL or BI Publisher’s Simplified XSL)
• Converted internally into XSL-FO style sheets
• Easy to create using BI Publisher Template Builder
PDF • PDF forms that include mapping of XML elements to form fields.
Forms • Easy to use with government forms
• Reduce the effort of recreating the form in a reporting tool
• Offer less options than RTF templates
e-Text • Simplify the generation of character delimited or fixed character
Templates position documents
• Best used for ETF (Electronic Fund Transfer) or EDI (Electronic
Data Interchange) documents

Oracle BI Publisher EE (Standalone Server):


Oracle BI Publisher supports the following Six Layout Template Types in Oracle BI
Publisher EE (Standalone Server)

Layout Document Formatting


RTF • Microsoft Word documents are marked up with XSL Code
Templates (Standards XSL or BI Publisher’s Simplified XSL)
• Converted internally into XSL-FO style sheets
• Easy to create using BI Publisher Template Builder
PDF Forms • PDF forms that include mapping of XML elements to form
fields.
• Easy to use with government forms
• Reduce the effort of recreating the form in a reporting tool
• Offer less options than RTF templates
e-Text • Simplify the generation of character delimited or fixed
Templates character position documents
• Best used for ETF (Electronic Fund Transfer) or EDI
(Electronic Data Interchange) documents
Excel • Allow reading a flat data set into EXCEL
Analyzer • Can obtain BI Publisher macros for refreshing the data or
Templates custom macros that are triggered when report is opened
• Cannot be printed directly and are solely for refreshing and
formatting data in EXCEL
Flash • Allow the use of Adobe Flex Files (swf) with BI Publisher
Templates • Require coding in Adobe Flex Builder and allow for nearly
unlimited interactivity
• Are self-contained – they contain the data and can be
viewed without a connection to the internet
• Not suitable for printed reports
XSL Style • Allows for third party tools and legacy solutions
Sheets

RTF Template Best Practice

Use Tables
• To optimize the exact placement of elements when the template is
transformed into XSL, it is recommended that you use tables to define the
placement and alignment.
• By using a table, each element can be aligned within its own cell and in exact
positions.
• Tables used for formatting only can be hidden at runtime by turning off
(hiding) the table gridlines.
Use Word Styles
• Makes it easier to achieve consistency in the template and between templates
Use Form Fields
• Form Fields keep the template clean
• Form Fields are supported by the Template Builder Field Browser
• Form Fields can be colored or hidden to understand the structure
Caveat: Word Header and Footer don’t allow Form Field
Don’t Overcomplicate the Template
• The Template is easier to understand, debug and maintain
• In general it is better to have different business documents in different
templates
• Try to limit the logic in templates to simple if or loop statements
• Use Sub templates to simplify documents if necessary
• Some calculations are easier performed in the data templat

Use Sub-Template:
• XSL sub templates for code re-use or separation
• RTF sub templates for layout re-use
• Caveat: Use of RTF sub templates makes it hard to understand the template
structure

Use Cases:
RTF sub templates:
• Re-use common layouts such as header/footer
• Internationalized address block
XSL sub templates:
• Transformations for complex chart requirements
• Dynamically apply formatting to a portion of data
• Print formatted XHTML data – convert to FO using sub template

Tuning

Tables:
Large tables that continue over hundreds of pages consume considerable server
resources. If possible group the data and create a table inside each grouping.

Grouping:
• Sorting large data sets is typically better performed by the database (indices,
efficient disk sorting..)
• However, regular grouping <?for-each-group?> will force the XSL engine to
“sort” the data.
• The group-adjacent option will not resort the data
• <xsl:for-each-group select=“…" group-adjacent=“INVOICE">
• Checking “Data already sorted” option in the Table Wizard will make use of
group-adjacent

You might also like