ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Reports and Report Writing

Errors compiling .\OTHERCUSTOMERS.jasper! it.businesslogic.ireport.ReportClassLoader@a5adc

You need to be logged in to post messages

Errors compiling .\OTHERCUSTOMERS.jasper! it.businesslogic.ireport.ReportClassLoader@a5adc

11/10/2005 11:09 AM EST (edited)
Default user photo

By Sam ..

Hello,

Iam trying to set a variable with a value which is difference of a Field and parameter. example

Inside the varibale i gave expression
$F - $P
like this. THey both are double datatype.

in the report iam trying to display the value in the variable .

$V

wheni compile i get the error below. I need to caluclate the difference. It would be great if any one can help quick.
HELPEHELPEHELp

Compiling to file... .\OTHERCUSTOMERS.jasper -> C:\iopen\iReport-0.5.1\OTHERCUSTOMERS.java Errors compiling .\OTHERCUSTOMERS.jasper! it.businesslogic.ireport.ReportClassLoader@a5adc net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The constructor Double(Double) is undefined                 value = (java.lang.Double)(new Double( ((java.lang.Double)parameter_TOP10CLAIMSUM.getValue())));                                           <-------------------------------------------------------------------> 2. The operator - is undefined for the argument type(s) java.lang.Double, java.lang.Double                 value = (java.lang.Double)(((java.lang.Double)field_CLAIMSSUM.getValue()) - ((java.lang.Double)parameter_TOP10CLAIMSUM.getValue()));                                           <--------------------------


Double)parameter_TOP10CLAIMSUM.getValue())));                                           <-------------------------------------------------------------------> 6. The operator - is undefined for the argument type(s) java.lang.Double, java.lang.Double                 value = (java.lang.Double)(((java.lang.Double)field_CLAIMSSUM.getValue()) - ((java.lang.Double)parameter_TOP10CLAIMSUM.getValue()));                                           <-------------------------------------------------------------------------------------------------------> 6 errors     at net.sf.jasperreports.engine.design.JRJdtCompiler.compileReport(JRJdtCompiler.java:178)     at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:129)     at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127)     at net.sf.jasperreports.e

ngine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:109)     at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:461)     at java.lang.Thread.run(Unknown Source)

1. 11/11/2005 4:50 PM EST

Both the field and the parameter are of type Double. Convert them to 'double' before using them in an expression.

new Double($F.doubleValue() - $P.doubleValue())

2. 11/14/2005 10:48 AM EST
Default user photo

By Sam ..

Thanks Much !!.

Before I wrote a code for the caluclation and called that Program inside the report to make it work. To make it less complex i used the way u said. It works Fine.

Thanks
Blossom

2 results found