Jump to content

using break in jasper report 4.7.0 vs 5.1.2


cartic29

Recommended Posts

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);
}

 

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...