Subramanian Meyyappan Posted May 28, 2012 Share Posted May 28, 2012 hi experts,using ireport3.0.0.i want to subtract two number.i created a variable named CloseBal.in variable expersion i wrote like this. $F{DEBIT_AMOUNT} - $F{CREDIT_AMOUNT}but the while compilingThe Operator - is undefined for the argument type(s)java.math.bigDecimal,java.math.bigDecimalLine 218 column 23 /jasperReport/variable[3]/variableExperssion[1]in my fields Section DEBIT_AMOUNT and CREDIT_AMOUNT both of the fields is of java.lang.BigDecimalsome more info.net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)field_DEBIT_AMOUNT.getValue())- ((java.math.BigDecimal)field_CREDIT_AMOUNT.getValue()));//$JR_EXPR_ID=10$ <------------------------------------------------------------------------------------------------------------->2. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)field_DEBIT_AMOUNT.getOldValue())- ((java.math.BigDecimal)field_CREDIT_AMOUNT.getOldValue()));//$JR_EXPR_ID=10$ <------------------------------------------------------------------------------------------------------------------->3. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)field_DEBIT_AMOUNT.getValue())- ((java.math.BigDecimal)field_CREDIT_AMOUNT.getValue()));//$JR_EXPR_ID=10$ <------------------------------------------------------------------------------------------------------------->3 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:591) at java.lang.Thread.run(Unknown Source) could any one help me where am ? Post Edited by adfpeoples at 05/28/2012 06:33 Link to comment Share on other sites More sharing options...
Subramanian Meyyappan Posted May 28, 2012 Author Share Posted May 28, 2012 i gave a look to those thread . it's help me. subtracting two variable total fields in ireport error compiling BigDecimal values 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