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

subtract two values


Recommended Posts

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 compiling
The Operator - is undefined for the argument type(s)java.math.bigDecimal,java.math.bigDecimal
Line 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.BigDecimal

some 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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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