Domanda

In report I have crosstab and one subreport, both in Summary Band.

Problem is repeating of Crosstab column header in XLS report. (Want to have only one column header)

I've tried some tricks, but nothing is good enough.

1) If uncheck Crosstab Properties - Repeat Column Header result is ok but than don't have headers in HTML and PDF, it is not ok.

2) If IS_IGNORE_PAGINATION = true only for XLS, it is OK but for some reason subreport is not printing! (this is the biggest problem,don't know why?)

3) Properties like this are not applicable on CROSSTAB

result.put("net.sf.jasperreports.export.xls.exclude.origin.band.1", "pageHeader");
result.put("net.sf.jasperreports.export.xls.exclude.origin.band.2", "pageFooter");
result.put("net.sf.jasperreports.export.xls.exclude.origin.band.3", "columnHeader");
result.put("net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1", "columnHeader");
result.put("net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2", "pageHeader");

4) I have tried to put main page report page height to some big number like 999999 but still subreport is not printing if IS_IGNORE_PAGINATION = true

Is there some property for crosstab that can be set from Java, depending on output format?

È stato utile?

Soluzione

I will answer to my own question.

After many attempts, due to a lack of time, I made a new report for XLS output format. (Now I have two nearly same report, one for PDF and HTML, and other for XLS output format)

In report I have unchecked Crosstab Properties - Repeat Column Header.

The downside of this is maintenance, but for now this is the only solution.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top