Oracle® Business Intelligence New Features Guide Release 10.1.3.3.3 Part No. E10416-04 |
|
Previous |
Next |
This chapter describes how to convert reports from Oracle Reports to Oracle BI Publisher.
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:
Run the conversion utility.
Load the PL/SQL package into the database.
Upload the report to the Oracle BI Publisher repository.
Test the report and check the conversion log files to identify any manual modifications needed to complete the conversion.
This section describes the steps required before running the conversion utility.
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 (10.1.2.0.2) from:
http://www.oracle.com/technology/software/products/ids/index.html
and install Reports Designer.
If your reports are already in Oracle Reports XML format, there is no need to install Oracle Reports.
To run the conversion utilities you need the following jar files in your classpath:
Collections.zip -
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:
C:\Oracle\bi\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\WEB-INF\lib
BIPBatchConversion is the utility to migrate reports from Oracle Reports to BI Publisher.
It takes the following parameters:
-source — (required) Source directory for Oracle Reports files. All reports must be in the same format - either RDF or XML.
-target — (required) Target directory to create Oracle BI Publisher report objects. This includes the Oracle BI Publisher Report file (.xdo), the layout template file (.rtf), the PL/SQL package, and log file.
-oraclehome — (optional) If your reports are in Oracle Reports XML format do not specify this parameter. If your reports are not in Oracle Reports XML format, specify the Oracle home path where Oracle Report Designer (9i or later version) is installed. BIPBatchMigration assumes that rwconverter is contained in the bin directory beneath the Oracle Home path.
BIPBatchConversion requires rwconverter from Oracle Reports to convert the report from RDF format to XML format.
-debug — (optional) To run the utility in debug mode and write debug statements to the log file.
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\collections.zip;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\collections.zip;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 10.1.3.3 Java API reference (Javadoc) for more details on this utility and other related conversion APIs in the rdfparser package.
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\collections.zip;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
Many 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\ raxinv\raxinvS.pls SQL> @C:\BIPublisher_reports\ raxinv\raxinvB.pls
Making your reports visible in the Oracle BI Publisher repository is a two-step process:
Copy the report folders into the repository.
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:
C:\oracle\bi\xmlp\XMLP
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 (http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/toc.htm):
"Loading XML Content into Oracle XML DB"
"FTP, HTTP(S), and WebDAV Access to Repository Data"
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.
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.
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.
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 (http://download.oracle.com/docs/cd/E10091_01/doc/bip.1013/b40017/toc.htm)