I am having problems with the XLSX exporter of our reports. In our companie's report development it is a common use-case to add empty static fields and just configure borders to it. (Also: They are set to be "transparent"). This way we separate f.e. some header information from the actual content. This is our working environment:
- Jaspersoft Studio 6.10
- JasperReports Server 7.2
- OpenJDK 8
On report level we configured this parameters:
- net.sf.jasperreports.export.xls.ignore.cell.background = true
- net.sf.jasperreports.export.xls.ignore.cell.border = false
- net.sf.jasperreports.export.xls.ignore.graphics = false
- net.sf.jasperreports.export.xls.white.page.background = false
Maybe also important: The properties are only configured on reportbook, not on the included subreports.
Exporting the finished reportbook to XLSX is not showing any borders. The rest of the configuration is fine. But if I am exporting to XLS the borders are there. I also tried to configure it in the applicationContext.xml but that did not change anything also.
Any help or hints what I am doing wrong is highly appreciated.
After searching for weeks now, I figuered out what is wrong. The behaviour of the property net.sf.jasperreports.export.xls.ignore.cell.background is different for XLS and XLSX.
- XLS: Really only controlling the background/color of a cell
- XLSX: Seems to be more a flag for "ignore any style for cell"
Meaning: Changing this property to false (instead of true like in my original post here) fixed the problem. Borders are now also shown in XLSX.
Maybe I misunderstood the purpose of ignoreCellBackground but my understanding of the property is "make every cell background transparent". Cell border is not part of the background in my opinion. This is extremly misleading and also quite hard to find out.
Dispite that I would expect no difference for my original configuration between the XLS and XLSX exporter because Excel is Excel. So this is a bug from my point of view.