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

sum of two variables: urgent plz


rbojja

Recommended Posts

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

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