rbojja Posted June 17, 2008 Share Posted June 17, 2008 HI all,I am doing a sum of two fields. UNIT_PRICE and TAX V_SUM_UNIT_PRICE = $F{UNIT_PRICE} gives total of unit_price and V_SUM_TAX = $F{TAX} gives total of tax amount. Now i need to sum the totals of 'V_SUM_UNIT_PRICE ' and 'V_SUM_TAX ' as 'V_SPL_ORDER_TOTAL'. Can any one help me in acheving a sum of the above two variables into the 'V_SPL_ORDER_TOTAL'. Thanks Link to comment Share on other sites More sharing options...
lucianc Posted June 17, 2008 Share Posted June 17, 2008 You should simply add the two variables:Code:<variable name="V_SPL_ORDER_TOTAL" class="java.lang.Float/Double/Integer/.."> <variableExpression>new Float($V{V_SUM_UNIT_PRICE}.floatValue() + $V{V_SUM_TAX}.floatValue())</variableExpression></variable> HTH,Lucian Link to comment Share on other sites More sharing options...
rbojja Posted June 17, 2008 Author Share Posted June 17, 2008 Thank you, 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