Jump to content
We've recently updated our Privacy Statement, available here ×

Print When Expression DOSN'T WO


faithfultoksa

Recommended Posts

Hi 

I applied precisely what explained in in this web page :

 

Using parameters to filter records during report processing

But can't preview the result!!

notice that :

I checked data type in database table and report textfield .. matched OK 

the expression as in previous link like this:              $F{InvoiceValue}.intValue() >= $P{MinInvoiceValue}

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

the problem is .. ( when click on preview .. nothing happen ) 

and show me this error message : 

Compiling to file... D:librarydreamJavaJava NetBeans Projects folderSalesSystemjasperReportsSimpleTable.jasper Errors compiling D:libraryjasperReportsSimpleTable.jasper! Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@d70829

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The method intValue() is undefined for the type String
                value = ((java.lang.String)field_InvoiceValue.getValue()).intValue()>= ((java.lang.Integer)parameter_MinInvoiceValue.getValue()); //$JR_EXPR_ID=9$
                                                                          <------>
2. The method intValue() is undefined for the type String
                value = ((java.lang.String)field_InvoiceValue.getOldValue()).intValue()>= ((java.lang.Integer)parameter_MinInvoiceValue.getValue()); //$JR_EXPR_ID=9$
                                                                             <------>
3. The method intValue() is undefined for the type String
                value = ((java.lang.String)field_InvoiceValue.getValue()).intValue()>= ((java.lang.Integer)parameter_MinInvoiceValue.getValue()); //$JR_EXPR_ID=9$
                                                                          <------>
3 errors

    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:512)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Compilation running time: 172!


 

Link to comment
Share on other sites

From the error message, it seems like you've defined $F{InvoiceValue} as String instead of as a float.

In screenshot of step 7, $F{InvoiceValue} is shown to be a "Float".

Check that the class type of $F{InvoiceValue} is "java.lang.Float".

Link to comment
Share on other sites

i set it as float .. same error message .. 

i correct it many times and same error message 

 Compiling to file... D:librarydreamJavaiReportjasperReportsSimpleTable.jasper

Errors compiling D:libraryJavaiReportjasperReportsSimpleTable.jasper! Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@66b105


net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The method intValue() is undefined for the type String
                value = (((java.lang.String)field_InvoiceValue.getValue()).intValue())>= (((java.lang.Integer)parameter_MinInvoiceValue.getValue())); //$JR_EXPR_ID=9$
                                                                           <------>
2. The method intValue() is undefined for the type String
                value = (((java.lang.String)field_InvoiceValue.getOldValue()).intValue())>= (((java.lang.Integer)parameter_MinInvoiceValue.getValue())); //$JR_EXPR_ID=9$
                                                                              <------>
3. The method intValue() is undefined for the type String
                value = (((java.lang.String)field_InvoiceValue.getValue()).intValue())>= (((java.lang.Integer)parameter_MinInvoiceValue.getValue())); //$JR_EXPR_ID=9$
                                                                           <------>
3 errors

    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:512)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Compilation running time: 172!


 

Link to comment
Share on other sites

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...