Menu

#72 Create Excel report - IgnorePagination does not work

v1.0_(example)
open
nobody
None
5
2013-09-09
2013-09-09
catalin
No

I have updated dynamic jasper from 3.1.8 to 4.0.3 and generating Excel reports does not work properly any more.

Issue:
My Excel report is composed from 2 big concatenated subreports. The subreports can not be displayed on 2 separate sheets anymore. This was possible in v 3.1.8.
Here is my code:
...
drb.setIgnorePagination(true)
...
drb.addConcatenatedReport(createSubreport1("Sub report 1"), new ClassicLayoutManager(),
"statistics", DJConstants.DATA_SOURCE_ORIGIN_PARAMETER, DJConstants.DATA_SOURCE_TYPE_COLLECTION,false);//note that startOnNewPage=false
drb.addConcatenatedReport(createSubreport1("Sub report 2"), new ClassicLayoutManager(), "statistics", DJConstants.DATA_SOURCE_ORIGIN_PARAMETER, DJConstants.DATA_SOURCE_TYPE_COLLECTION,true);//note that startOnNewPage=true
....
JRXlsxExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

How to easy reproduce it:
- take the DynamicJasper-4.0.3-test-sources
- edit class ConcatenatedReportTest http://dynamicjasper.com/docs/current/xref-test/ar/com/fdvs/dj/test/subreport/ConcatenatedReportTest.html, change method buildReport and set setIgnorePagination=true;
- edit class Product and add more statistics_ - this is necessary to have more pages in one sheet. Code example:
for(int i=2000;i<2199;i++) {
statistics_.add(new Statistic(formatter.parse("01/01/"+i),"West",14.3f,50.4f,43.1f));
....
- run the test

My JVM is SUM 1.6.0_37-b06.

Discussion


Log in to post a comment.