Total Pageviews

2012/02/14

Apply IS_IGNORE_PAGINATION when export to CSV in JasperReports

Problem

I'm writing a report which needs to be exported to pdf and CSVformat.
when output format is CSV, it should be ignore pagination. 
The screenshot as bellowing is wrong, it has pagination in CSVfile:


Solution
JasperReports provides IS_IGNORE_PAGINATION.
It is a fill-time parameter, therefore you'll have to set it when filling the report:

params.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE);
JasperFillManager.fillReport(jasperReport, params, dataSource);


See...CSV file does not have pagination after set IS_IGNORE_PAGINATION to TRUE.


No comments: