faithfultoksa Posted June 4, 2016 Share Posted June 4, 2016 Hi I applied precisely what explained in in this web page : Using parameters to filter records during report processingBut 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 More sharing options...
hozawa Posted June 6, 2016 Share Posted June 6, 2016 So what's the error message or are you just getting blank page? The formula looks OK to me.Should be contacting the author of the book if the sample contained in the book does not work. Link to comment Share on other sites More sharing options...
faithfultoksa Posted June 6, 2016 Author Share Posted June 6, 2016 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@d70829net.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 More sharing options...
hozawa Posted June 6, 2016 Share Posted June 6, 2016 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 More sharing options...
faithfultoksa Posted June 7, 2016 Author Share Posted June 7, 2016 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@66b105net.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 More sharing options...
sanbez Posted June 7, 2016 Share Posted June 7, 2016 show part of jrxml with definition parameters and fields Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now