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?
-
Did any of these answers help, @shikarishambu? – Dave Jarvis Sep 25 '19 at 15:16
3 Answers
A fully automated solution is probably not possible. You can partially automate the conversion process as follows:
- Convert the RDF files to XML.
- Extract the report query.
- Convert the XML to BIRT (or JRXML) using XSLT.
XML Conversion
The first step is fairly 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 easy, using starlet (rename xml.exe
to starlet.exe
to avoid conflicts with Oracle's xml.exe
):
starlet.exe sel -t -v "/report/data/dataSource/select" filename.rdf.xml
You can also use xmllint, but it includes the select
and CDATA
elements, which you'd have to parse separately:
xmllint --xpath /report/data/dataSource/select filename.rdf.xml
Format Conversion
The third step is challenging. Create an XSL template that reads the RDF layouts (e.g., <displayInfo x="0.74377" y="0.97913" width="1.29626" height="1.62695" />
). Then convert those layouts to the corresponding format used by the destination report engine (such as BIRT or JasperReports).
You wouldn't get a 100% solution, but an 80% solution could significantly reduce the amount of monotonous, error-prone work required to convert the reports.

- 30,436
- 41
- 178
- 315
I once had a job to convert *.rdf files to Jasper reports. Since I don't know BIRT, I have no idea if this approach would work with BIRT, too.
Anyway, I exported the *.rdf files as xml and parsed the output with Perl and wrote the Jasper definitions, also as xml. For most reports, this worked pretty well. I have -however- one report in mind that I couldn't translate automatically: that was a report where the result set of two queries were laid out side by side.

- 39,402
- 33
- 158
- 293
-
@Rene: Can you teel me how to write the jasper definition to xml,as i am trying to convert rdf to jrxml,So the approach which i was selecting was to convert rdf to xml and then xml to Jrxml,if you are having any approach then could you please help me with it because mine approach looks little tedious. – Dark Army Oct 07 '15 at 09:43
I haven't found any tools which do this. Some might call this a business opportunity.
RDF
files, as far as I can tell, are in some funky binary format. To even have a shot at this, I'd probably convert it first into a REX
file, which is supposed to be portable xml. Then, it is a matter of transforming from the REX
structure to the BIRT
structure. Honestly, I have no idea how documented the REX file is, but maybe since you know how it looks from the visual side you can make sense of it.
Good luck!

- 7,218
- 30
- 57
-
I saw that article, but didn't know if the XML Publisher output is useful for BIRT. – Adam Hawkes Jan 25 '11 at 21:14