Skip Headers
Oracle® Business Intelligence New Features Guide
Part No. E10416-04
  Go To Documentation Library
Go To Product List
Go To Table Of Contents


16 Converting Reports from Oracle Reports to Oracle BI Publisher

This chapter describes how to convert reports from Oracle Reports to Oracle BI Publisher.

16.1 Overview

Oracle BI Publisher provides a utility for converting reports from Oracle Reports to Oracle BI Publisher.

In Oracle Reports, the data model (SQL query or extraction logic) and layout are contained in a single file. In Oracle BI Publisher the data model and the layout are separate objects. The conversion utility therefore generates several files that will make up your report in Oracle BI Publisher. In most cases this will include a PL/SQL specification and body that you will need to create in the database that contains the data for the report. The utility will also generate a report definition file and a layout template file that you will upload to the Oracle BI Publisher repository.

Once uploaded, test the report to ensure that the output is as expected and make any changes to the report as needed. Some reports will contain structures that the utility cannot convert. These must be manually implemented in the converted reports.

The overall flow for the conversion process 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.

  4. Test the report and check the conversion log files to identify any manual modifications needed to complete the conversion.

16.2 Prerequisites

This section describes the steps required before running the conversion utility.

16.2.1 Reports and Oracle Reports XML Format

During the conversion process, the source reports must eventually be in Oracle Reports XML format. Oracle Reports XML format is supported in Oracle Reports 9i and above.

If your source reports are not in Oracle Reports XML format, the conversion utility will do this conversion automatically. However, this requires Oracle Reports Designer 9i or later on the same machine where you will do the conversion so that the Oracle BI Publisher conversion utility can call the rwconverter executable to get the reports into Oracle Reports XML format.

To get Oracle Reports Designer, download Oracle Developer Suite 10g ( from:

and install Reports Designer.

If your reports are already in Oracle Reports XML format, there is no need to install Oracle Reports.

16.2.2 Update CLASSPATH with Needed JAR Files

To run the conversion utilities you need the following jar files in your classpath:

  • -

  • xmlparserv2-904.jar -

  • xdocore.jar

  • aolj.jar

For customers using Oracle Enterprise Business Suite (EBS), these libraries are available under JAVA_TOP. If these libraries are not there, the corresponding classes will be there under the JAVA_TOP.

For customer using Oracle BI Publisher Enterprise (sometimes referred to as "standalone"), all these libraries are available under WEB-INF\lib. Example:


16.2.3 JDK Version 1.1.8

The conversion utility requires JDK version 1.1.8 or later.

16.3 Conversion Utility

BIPBatchConversion is the utility to migrate reports from Oracle Reports to BI Publisher.

It takes the following parameters:

Command Line Usage:

java ... BIPBatchConversion [-debug] -source SourceDirectory -target TargetDirectory [-oraclehome OracleHomePath]

Sample Commands to run BIPBatchConversion:

Example 16-1 Source Report in Oracle Reports RDF File

This example requires you to specify the -oraclehome path.

java.exe  -classpath D:\Jdev\project\xdocore.jar;d:\Jdev\project\;d:\Jdev\project\aolj.jar;d:\Jdev\project\xmlparserv2-904.jar oracle.apps.xdo.rdfparser.BIPBatchConversion -source d:\reports\pay -target d:\reports\pay\output -oraclehome D:\oracle\BIToolsHome_1 -debug

Example 16-2 Source Report in Oracle Reports XML Format

Do not specify the -oraclehome parameter in this example.

java.exe  -classpath D:\Jdev\project\xdocore.jar;d:\Jdev\project\;d:\Jdev\project\aolj.jar;d:\Jdev\project\xmlparserv2-904.jar oracle.apps.xdo.rdfparser.BIPBatchConversion -source d:\reports\pay -target d:\reports\pay\output  -debug

See the Oracle BI Publisher Java API reference (Javadoc) for more details on this utility and other related conversion APIs in the rdfparser package.

16.3.1 Output Files

The conversion utility will generate the following output files for each report:

  • Report definition file that includes the Data Model (for example: REPORT.xdo)

    (Note: This file is not needed for E-Business Suite users; see the following note under DataTemplate.)

  • DataTemplate (for example: REPORT_template.xml)

    (Note: this is not required for Oracle BI Publisher Enterprise users because the data template is embedded in REPORT.xdo.)

  • Default PL/SQL package specification (for example: REPORTS.pls)

  • Default PL/SQL package body (for example: REPORTB.pls)

  • RTF Layout Template (for example: REPORT.rtf)

  • Log file (for example: REPORT.log)

For example, assume you have a report called raxinv.rdf located in D:\reports\pay. Running this command:

java.exe  -classpath D:\Jdev\project\xdocore.jar;d:\Jdev\project\;d:\Jdev\project\aolj.jar;d:\Jdev\project\xmlparserv2-904.jar oracle.apps.xdo.rdfparser.BIPBatchConversion -source d:\reports\pay -target d:\reports\pay\output -oraclehome D:\oracle\BIToolsHome_1 -debug

Will generate the following output files:

  • PL/SQL Package Specification: C:\BIPublisher_reports\ raxinv\raxinvS.pls

  • PL/SQL Package Body: C:\BIPublisher_reports\ raxinv\raxinvB.pls

  • Report definition file: C:\BIPublisher_reports\ raxinv\raxinv.xdo

  • DataTemplate: C:\BIPublisher_reports\ raxinv\raxinv_template.xml

  • RTF Layout Template: C:\BIPublisher_reports\raxinv\raxinv.rtf

  • Log file: C:\BIPublisher_reports\raxinv\raxinv.log

16.4 Upload PL/SQL Package to the Database

Many converted Oracle Reports will generate a PL/SQL package specification file and a PL/SQL package body file as follows:

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\ raxinv\raxinvS.pls
SQL> @C:\BIPublisher_reports\ raxinv\raxinvB.pls

16.5 Putting Converted Reports into the Oracle BI Publisher Repository

Making your reports visible in the Oracle BI Publisher repository is a two-step process:

  1. Copy the report folders into the repository.

  2. Refresh the repository metadata.

If you have a file-based repository, copy the report folder structure to the file system. For example, suppose your repository path was set to:


For the report in the previous example, simply copy the report directory and all its files to the desired folder structure in the existing report repository.

For example:

> copy C:\BIPublisher_reports\raxinv C:\oracle\bi\xmlp\XMLP\Shared Folders\Converted reports

If you are using the XML DB functionality of the Oracle Database as your report repository, there are several ways you can upload content. One method is through WebDAV.

For options and details on how to load reports into your XML DB based repository, please refer to the following topics in the Oracle XML DB Developer's Guide (

Once you have loaded report directories into your 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.

16.6 Testing and Tweaking Your Reports

Now that you have successfully converted your reports, created the needed PL/SQL package, and moved the report definition and RTF template files into the Oracle BI Publisher repository, you should test your reports to make sure they are providing the data and formatting that you want.

Most converted reports will run exactly as expected without further modification. More complex reports may require some additional modification to work as desired. Following are some common issues with converted reports.

16.6.1 Data Template and PL/SQL Files

Occasionally when converting a more complex Oracle Reports report, the Data Template or PL/SQL may contain minor errors and require manual correction.

The conversion utility will move all formula columns to the select clause of the SQL query in the data model. In most cases this will not cause a problem. However, if any of the arguments to the formula is a summary column, this will not work because the summary column will not be calculated at the time the query is executed.

To correct this problem you will need to remove this formula from the select clause and implement the formula as XSL in your layout template. Most of these formulas are used either for simple addition or summation or currency conversion, formatting, and rounding.

16.6.2 RTF Layout Template File

The majority of Oracle Reports reports use simple 'if' formatting logic that is automatically converted to equivalent XSL-FO and inserted into form fields in the RTF layout template. However, there is no support for PL/SQL in RTF layout templates. The conversion utility does not convert any PL/SQL format trigger logic present in the report. Instead the conversion utility writes all the format trigger code to a log file. You will need to implement any corresponding PL/SQL logic as XSL code.

To aid in this process, the resulting RTF template will contain form fields 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. You will need to rewrite these PL/SQL triggers as XSL-FO.

For more information, see the "Supported XSL-FO Elements" section of the Oracle Business Intelligence Publishers User's Guide (