using break in jasper report 4.7.0 vs 5.1.2

Hi All,

We are generating an excel report from extjs UI which has a few filter parameters and a button to fetch the data as per the selected filters. The data is displayed in a extjs grid below the filter components. During the export of data, the filter parameters are to be put in the sheet 1 of excel and the data to be put in the sheet 2. This works fine with jasper report jar 4.7.0 but with jasper report jar 5.1.2, the filter details and the data are in the same sheet. Note that there is no code change and just the jar has changed. Please let me know if I'm missing something.

Attached is the jrxml and belwo are a few lines of java code:

Loading jrxml

JasperDesign jasperDesignObj = JRXmlLoader.load(ReportUtil.getJRXMLResourcePath(reportType, CommonConstants.JRXML_EXTENSION));


JRBeanCollectionDataSource beanColDataSource = new JRBeanCollectionDataSource(dataProviderList);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesignObj);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, beanColDataSource);
The jasperPrint.getPages().size() returns 2 with 4.7.1 but 1 with 5.1.2, not sure how this happens.

Properties set:

if (CommonConstants.FILE_TYPE_EXCEL.equals(fileType)) {

parameters.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE);
parameters.put(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
parameters.put(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
parameters.put(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
parameters.put(JRXlsExporterParameter.IGNORE_PAGE_MARGINS, Boolean.TRUE);





cartic29's picture
Joined: Aug 28 2013 - 12:08am
Last seen: 8 years 8 months ago

Im using the JRXlsxExporter</p>

cartic29 - 8 years 8 months ago

0 Answers:

No answers yet