[#2749] - CSV and XLS write.header and exclude bands properties not working

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

I am trying to take a tabular report, and export it to csv and/or xls. I have the following properties set in my .jrxml:

<property name="net.sf.jasperreports.export.csv.exclude.origin.band.1" value="title"/>
<property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="columnFooter"/>
<property name="net.sf.jasperreports.export.csv.exclude.origin.band.3" value="pageFooter"/>
<property name="net.sf.jasperreports.export.csv.exclude.origin.band.4" value="lastPageFooter"/>
<property name="net.sf.jasperreports.export.csv.exclude.origin.band.5" value="summary"/>
<property name="net.sf.jasperreports.export.csv.exclude.origin.band.6" value="columnHeader" />
<property name="net.sf.jasperreports.export.csv.write.header" value="true" />

<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="columnFooter"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.3" value="pageFooter"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.4" value="lastPageFooter"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.5" value="summary"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.6" value="columnHeader" />
<property name="net.sf.jasperreports.export.xls.write.header" value="true" />

The hiding of the individual bands does NOT work in iReport. When i upload the same .jrxml file to JasperServer v5.0, the band hiding works, but the write.header flag seems to have no effect and i end up with just data, and no header row.

v5.0
mattinger_1's picture
Joined: Oct 22 2012 - 12:33pm
Last seen: 8 years 6 months ago

1 Comment:

#1
  • Assigned:nobody»

I think this is due to the lack of Metadata exporters support in Jasperserver 5.0.

If you look at the api's documentation you'll see that the net.sf.jasperreports.export.xls.write.header is only used by the metadata based reports, and Jasperserver 5.0 doesn't include them. For the bands, no idea, sorry.

http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasper...

Property that specifies whether the export header (the column names) should be written or not, in the metadata-based Excel export.

Feedback
randomness