Java Reference
In-Depth Information
As we can see in the example, the JRExporter implementation used to export
to XML is net.sf.jasperreports.engine.export.JRXmlExporter . The same
procedure used in previous examples is used to set the report to export and the
resulting file name.
Notice the file name used for the exported report contains the
extension .jrpxml . Even though exported reports are standard
XML files, it is customary to use this extension instead of .xml .
The following is a partial listing of the generated XML file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperPrint PUBLIC "-//JasperReports//DTD Report Design//EN"
<jasperPrint name="DatasetDemoReport" pageWidth="595"
<text textHeight="13.578125" lineSpacingFactor="1.3578125"
<reportElement x="5" y="40" width="500" height="20"/>
<textContent><![CDATA[Aircraft registered in MD]]></textContent>
<rectangle radius="0">
<reportElement mode="Opaque" x="5" y="60" width="782"
height="80" forecolor="#000000"/>
<graphicElement pen="None" fill="Solid"/>
<reportElement x="105" y="80" width="100" height="20"
<box border="Thin" borderColor="#000000"/>
<text textAlignment="Left" verticalAlignment="Bottom"
textHeight="13.578125" lineSpacingFactor="1.3578125"
<reportElement x="5" y="0" width="55" height="20"/>
Search WWH ::

Custom Search