Search code examples
jasper-reportsjasperserver

jasper reports: exporting table with grouped headers to excel


let's say, I have a table in my report with complex header like this

column report example

when I export it to either xls or xlsx using Jasper Reports Server it prints like this (Excel 2010):

column report fail

Column 1 height should be equal to Column 2 + Header height

Enviroment: Jasper Reports Server CE 4.5.1, tried latest version (5.0.4) - same (sad) result

How can I correctly export such header to Excel?

Does anybody knows any workarounds?


Solution

  • JasperReportsServer is configured to collapse row spans, see the collapseRowSpan property of the xlsExportParameters bean in WEB-INF/applicationContext.xml.

    Set that property to false to have the group headers span two rows.

    iReport has the same property at Options/Export Options/Excel/Collapse Row Span.