Wednesday, March 23, 2011

Jasper Report Headings missing in Excel

When I export a report to excel from jasperserver there are no headers shown.

If you look in jasperreports.properties in the relevant server directory - for Tomcat it's in /webapps/jasperserver/WEB-INF/classes - you'll see the following lines:
#suppress page and column headers and footers when exporting to XLS
net.sf.jasperreports.export.xls.exclude.origin.band.1=pageHeader
net.sf.jasperreports.export.xls.exclude.origin.band.2=pageFooter
net.sf.jasperreports.export.xls.exclude.origin.band.3=columnHeader
net.sf.jasperreports.export.xls.exclude.origin.band.4=columnFooter
Comment these lines out and and re-run your reports and you should see the headers and footer.

Source: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=72256

No comments: