You are on page 1of 4

Oracle Report to XML Publisher Report

migration
1.0 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 e!traction logic" and Layout presentation"# both are
embedded together as an rdf file. In XML Publisher both of these layers are separated$ the
migration is t%o step process. Data Model migration and Layout migration. These can be
combined into a single shell script to con&ert an Oracle Report. The shell script can be
modified to con&ert all Oracle Reports in a gi&en directory.
The o&erall flo% is as follo%s'
2.0 Pre-Requisites
The migration APIs accept an Oracle Report in XML (ormat# this format is only supported in
Oracle Reports )i and abo&e. Therefore you need to ha&e a )i* &ersion of Oracle Reports
a&ailable. (or R+, the Oracle Reports &ersion in the techstac- is +..+./ so the con&ersion to
RD( XML is straightfor%ard. (or Release ++i the &ersion is 0i# so you %ill need a higher
&ersion of Oracle Reports a&ailable some%here on your system.
To get the Oracle Report in XML format from rdf format# either use Oracle Report Designer or
Oracle Report r%con&erter.e!e utility under 1ORA2L345OM36bin
3!ample
D'7Oracle4home78I9:r%con&erter batch;yes source; h'7reports7ra!in&.rdf dest; h'7reports7ra!in&.!ml
dtype;!mlfile o&er%rite;yes
This %ill con&ert the binary RD( file into an RD(<XML format that can then be consumed by
the con&ersion APIs.
.0 Process
Oracle
Reports 9i
RDF
XMLP
RTF
Templates
Oracle
Reports 9i
RDF-XML
XMLP
Data
Template
SupportingP
L/SQL
Packages
.1 !ata Mo"el Migration.
=se DataTemplate>enerator API to migrate the Oracle Reports Data Model to a DataTemplate
and associated PL6?@L logic to PL6?@L Pac-age specification and body".
The API can be called through the command line or through a shell script. This %ill generate
follo%ing output files.
DataTemplate R3PORT.!ml"
Default PL6?@L pac-age specification R3PORT?.pls"
Default PL6?@L pac-age body R3PORT8.pls".
3!ample '
Aa&a%.e!e oracle.apps.!do.rdfparser.DataTemplate>enerator 5'7report7ra!in&.!ml
Output files
PL6?@L Pac-age'5'7 report7ra!in&?.pls
PL6?@L 8ody'5'7report7ra!in&8.pls
DataTemplate'5'7report7ra!in&4template.!ml
.2 La#out Migration.
=se RT(Template>enerator API to migrate the Oracle Reports layout to an XML Publisher
RT( template.
?ince there is no support of PL6?@L in RT( Template# the process does not migrate any format
trigger logic present in the report. Instead the generator %rites all the format trigger code to log
file. Bou %ill need to implement any corresponding PL6?@L logic as X?L code. The maAority of
Oracle Reports use simple CifD formatting logic that can be con&erted relati&ely easily. To aid in
this process# the resulting RT( template %ill contain formfields that hold the format trigger
names that are called# these fields %ill be highlighted in red. Bou can then refer to the log to
find the actual PL6?@L code used in the original Oracle Report.
The API can be called through the command line or through a shell script. This %ill generate
follo%ing output files.
RT( Template
Log file
3!ample '
Aa&a%.e!e oracle.apps.!do.rdfparser.RT(Template>enerator 5'7report7ra!in&.!ml
Output files

RT( Template' 5'7 report7 ra!in&.rtf
Log (ile ' 5'7report7ra!in&.log
$.0 %nown &ssues'
+. ?ome times# because of comple!ity of Oracle Report the# Data Template or PL6?@L has
some minor errors and reEuires manual correction.
,. (ormat triggers are not supported. The format trigger logic should be implemented
separately though X?LT
/. If formula column reference the summary column as parameter and the summary
column belongs to same Data ?ource6Data @uery# this implementation is not supported
in Data Template. This is because of all the formula columns mo&ed to select statement
and the summary column &alue is not a&ailable %hile e!ecuting the formula.
(.0 )atch *onversion
The three components to the migration can be combined into a single shell script to completely
automate the process. (urthermore# rather than Aust ha&e the script run on a single report file#
the script can be modified to run on all the reports in a gi&en directory.
This script %ill con&ert all RD(s in a directory. Bou %ill need a fe% Aa&a libraries'
+. 2ollections.Fip G a&ailable from ?un
,. !mlparser&,<).H G a&ailable from the IAJA4TOP directories
/. A pointer to the Apps IAJA4TOP G under here are the necessary XML Publisher
libraries
KL6bin6sh
K This script %ill generate a report for each template presnet in the current directory
+ *reate a variable to hol" the classpath
classpath;MDIR6collections.Fip'DIR6!mlparser&,<).H.Fip'IAJA4TOP directoryM
if N 1K <eE . O
then
for file in P.rdf
do
echo MProcessing ... 1fileM
if test <f 1file
then
+ *onvert the r", to -ml
echo yes Q 1ORA2L345OM36bin6r%con&erter.sh batch;yes source;1file dest;1file dtype;!mlfile
o&er%rite;yes$ 7
+ *reate a variable to hol" the new -ml ,ile name. this is /ust a simple replace
+ statement
!file;M1Rfile66rdf6!mlSM$
+ 0enerate the "ata template plus plsql
echo yes Q 6local6Aa&a6Ad-+.T..4.06bin6Aa&a <classpath 1classpath
oracle.apps.!do.rdfparser.DataTemplate>enerator 1!file$
+ 0enerate the R12 template
echo yes Q 6local6Aa&a6Ad-+.T..4.06bin6Aa&a Gclasspath 1classpath
oracle.apps.!do.rdfparser.RT(Template>enerator 1!file$
fi
done
else
echo usage' 1.
echo this script %ill generate a data template and supporting plsEl and an RT( template in the current directory
fi

You might also like