Exporting a report with multiple sheets from JasperServer to Excel

故事扮演 提交于 2019-12-06 14:07:25

You can use the net.sf.jasperreports.export.xls.one.page.per.sheet property.

The information about this property is here.

  • The property can be added to the jasperreports.properties file (in *jasperserver\WEB-INF\classes* folder):
net.sf.jasperreports.export.xls.one.page.per.sheet=true
  • The property can be added to the report template (jrxml file)

The sample:

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" ...>
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/>

You just remove IS_ONE_PAGE_PER_SHEET.Its working 100% .

exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); 

Just remove this line of coding from your code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!