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"
"http://jasperreports.sourceforge.net/dtds/jasperprint.dtd">
<jasperPrint name="DatasetDemoReport" pageWidth="595"
pageHeight="842">
<page>
<text textHeight="13.578125" lineSpacingFactor="1.3578125"
leadingOffset="-3.1972656">
<reportElement x="5" y="40" width="500" height="20"/>
<textContent><![CDATA[Aircraft registered in MD]]></textContent>
</text>
<rectangle radius="0">
<reportElement mode="Opaque" x="5" y="60" width="782"
height="80" forecolor="#000000"/>
<graphicElement pen="None" fill="Solid"/>
</rectangle>
<frame>
<reportElement x="105" y="80" width="100" height="20"
backcolor="#FFFFFF"/>
<box border="Thin" borderColor="#000000"/>
<text textAlignment="Left" verticalAlignment="Bottom"
textHeight="13.578125" lineSpacingFactor="1.3578125"
leadingOffset="-3.1972656">
<reportElement x="5" y="0" width="55" height="20"/>
<textContent><![CDATA[1]]></textContent>
</text>
</frame>
</page>
</jasperPrint>
 
Search WWH ::




Custom Search