intive-FDV / DynamicJasper

Dynamic Reports using Jasper Reports
http://intive-fdv.github.io/DynamicJasper/
GNU Lesser General Public License v3.0
244 stars 128 forks source link

Error by calculating AutoText.AUTOTEXT_PAGE_X_OF_Y #98

Open buedi opened 4 years ago

buedi commented 4 years ago

After updating to DynamicJasper v5.3.1 together witch jasperreports v6.13.0 I'm getting an exception by calculating the "AUTOTEXT_PAGE_X_OF_Y"

... final AutoText autoTextPage = new AutoText(AutoText.AUTOTEXT_PAGE_X_OF_Y, AutoText.POSITION_FOOTER, HorizontalBandAlignment.RIGHT); dynamicReportBuilder.addAutoText(autoTextPage); ...

at runtime I getting the error:

[JavaFX Application Thread] ERROR c.m.r.s.i.JasperReportsServiceImpl - Error during printDynamicReport... net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

  1. The operator + is undefined for the argument type(s) Integer, int value = ""+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getValue())+0)+" " + ""; //$JR_EXPR_ID=53$ <------------------------------------------------------>
  2. The operator + is undefined for the argument type(s) Integer, int value = str("autotext.page")+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getValue())+0)+" " + str("autotext.of"); //$JR_EXPR_ID=54$ <------------------------------------------------------>
  3. The operator + is undefined for the argument type(s) Integer, int value = ""+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getOldValue())+0)+" " + ""; //$JR_EXPR_ID=53$ <--------------------------------------------------------->
  4. The operator + is undefined for the argument type(s) Integer, int value = str("autotext.page")+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getOldValue())+0)+" " + str("autotext.of"); //$JR_EXPR_ID=54$ <--------------------------------------------------------->
  5. The operator + is undefined for the argument type(s) Integer, int value = ""+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getEstimatedValue())+0)+" " + ""; //$JR_EXPR_ID=53$ <--------------------------------------------------------------->
  6. The operator + is undefined for the argument type(s) Integer, int value = str("autotext.page")+" " + (((java.lang.Integer)variable_PAGE_NUMBER.getEstimatedValue())+0)+" " + str("autotext.of"); //$JR_EXPR_ID=54$ <---------------------------------------------------------------> 6 errors . at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:229) at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:358) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:618) at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperReport(DynamicJasperHelper.java:539) at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperReport(DynamicJasperHelper.java:506) at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperPrint(DynamicJasperHelper.java:243) at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperPrint(DynamicJasperHelper.java:215)
aakupcov commented 3 years ago

Actually non of the AUTOTEXT_PAGE functions work! It's for dynamicReports version 5.3.2 and JasperReports of 6.17.0 version, on dynamicReports version 5.3.2 and JasperReports of 6.8.0 version everything works fine.