Convert Oracle Reports (.rdf) to BIRT Reports

I have some Oracle reports (.rdf) that I am considering converting to BIRT reports. Is there a way to convert .rdf files to BIRT report design files?

+6
oracle birt report
source share
3 answers

A fully automatic solution is probably not possible. You can partially automate the conversion process as follows:

  • Convert RDF files to XML.
  • Retrieve the report request.
  • Convert XML to BIRT (or JRXML) using XSLT.

XML Conversion

The first step is pretty simple using Cygwin:

cd /path/to/reports/ mkdir xml for i in *.rdf; do rwconverter.exe batch=yes source="$i" dest=xml/"$i".xml dtype=xmlfile \ userid=scott/ tiger@xe done 

Extraction

The second step is also relatively simple using starlet (rename xml.exe to starlet.exe to avoid conflicts with Oracle xml.exe ).

 starlet.exe sel -t -v "/report/data/dataSource/select" filename.rdf.xml 

You can also use xmllint, but it includes select and CDATA elements that you must parse separately:

 xmllint --xpath /report/data/dataSource/select filename.rdf.xml 

Format conversion

The third step is difficult. Create an XSL template that reads RDF layouts (for example, <displayInfo x="0.74377" y="0.97913" width="1.29626" height="1.62695" /> ). Then convert these layouts to the appropriate format used by the destination report engine (for example, BIRT or JasperReports).

You would not get a 100% solution, but an 80% solution could significantly reduce the amount of monotonous, error-prone work needed to convert reports.

+4
source share

I once had work to convert * .rdf files to Jasper reports. Since I don't know BIRT, I have no idea if this approach will work with BIRT either.

Anyway, I exported * .rdf files to xml and parsed the output from Perl and wrote Jasper definitions, just like xml. For most reports, this worked very well. I have, in any case, one report that I could not automatically translate: it was a report in which the result set of two queries was laid out side by side.

+2
source share

I did not find any tools that do this. Some may call this a business opportunity.

RDF files, as far as I can tell, are in some kind of funky binary format. To even shoot it, I would probably convert it first to a REX file, which should be portable xml. Then it comes to converting from a REX structure to a BIRT structure. Honestly, I have no idea how the REX file is documented, but maybe since you know how it looks from the visual side, you can understand this.

Good luck

+1
source share

All Articles