Subtraction Calculation

Hello,
I'm trying to perform a subtraction calculation in ireport with two BigDecimal variables, but I have tried in every possible way and I can not.
this calculation must be done in the form, or in the query.
the calculation is very simple, I must get the negotiated quantity less the quantity invoiced, to obtain the pending amount.
in all the calculations I make, the report always returns me "NULL". Could someone help me?

suporte_72's picture
Joined: May 30 2019 - 1:24pm
Last seen: 4 years 3 months ago

It should be variable_name1.subtract(variable_name2).

soake - 4 years 3 months ago

I tried this too, but it did not work.

suporte_72 - 4 years 3 months ago

Have you confirmed both variable are indeed BigDecimal variables?

soake - 4 years 3 months ago
show 2 more...

yes, both in the database and in IReport

suporte_72 - 4 years 3 months ago

yes

suporte_72 - 4 years 3 months ago

1 Answer:

It should be variable_name1.subtract(variable_name2).

soake's picture
26
Joined: Jul 24 2017 - 7:37pm
Last seen: 4 years 1 month ago
Feedback