Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error by calculating AutoText.AUTOTEXT_PAGE_X_OF_Y #98

Open
buedi opened this issue Oct 6, 2020 · 1 comment
Open

Error by calculating AutoText.AUTOTEXT_PAGE_X_OF_Y #98

buedi opened this issue Oct 6, 2020 · 1 comment

Comments

@buedi
Copy link

buedi commented Oct 6, 2020

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
Copy link

aakupcov commented Jul 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants