removing group while doing CSV export in JasperReports 4.0.5

前端 未结 1 1419
梦如初夏
梦如初夏 2021-01-28 03:51

I am using the JasperReports 4.0.5. Trying to suppress group footer and headers while exporting to CSV. I\'ve tried the using of
net.sf.jasperreports.expor

相关标签:
1条回答
  • 2021-01-28 04:51

    For hiding only the groupHeader band you should add this two properties (both lines) to the jrxml file, for example:

    <property name="net.sf.jasperreports.export.csv.exclude.origin.band.1" value="groupHeader"/>
    <property name="net.sf.jasperreports.export.csv.exclude.origin.group.1" value="GroupExpenses"/>
    

    For hiding both groupHeader and groupFooter bands you should add all this properties to jrxml file:

    <property name="net.sf.jasperreports.export.csv.exclude.origin.band.1" value="groupHeader"/>
    <property name="net.sf.jasperreports.export.csv.exclude.origin.group.1" value="GroupExpenses"/>
    <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="groupFooter"/>
    <property name="net.sf.jasperreports.export.csv.exclude.origin.group.2" value="GroupExpenses"/>
    

    In both samples the group name is GroupExpenses.

    <group name="GroupExpenses">
    

    For more details look at How can I suppress page headers and footers when exporting to XLS? topic.

    0 讨论(0)
提交回复
热议问题