Problem in Calculation
Problem in Calculation
Hello,
I have problem in subtraction of any decimal number and integer number for example in my report :
Quantity Before = 12.3
Quantity After = 12.3 - 12 = 0.30000001 (this is wrong value it must give me 0.3)
and i don't want to apply any custom format
so my question is there any way to solve this problem ?!
I have problem in subtraction of any decimal number and integer number for example in my report :
Quantity Before = 12.3
Quantity After = 12.3 - 12 = 0.30000001 (this is wrong value it must give me 0.3)
and i don't want to apply any custom format
so my question is there any way to solve this problem ?!
Re: Problem in Calculation
Hello.
Could you specify which our component do you use? What version?
Could you describe step-by-step how to reproduce your issue?
Thank you.
Could you specify which our component do you use? What version?
Could you describe step-by-step how to reproduce your issue?
Thank you.
Re: Problem in Calculation
Hello,
version number :2014.3.17.0
i'm just used Stitext component and make calculation on veriable of type decimal = (12.3 - 12)
and this problem also exist if type of variable is double
version number :2014.3.17.0
i'm just used Stitext component and make calculation on veriable of type decimal = (12.3 - 12)
and this problem also exist if type of variable is double
Re: Problem in Calculation
Hello,
We couldn't reproduce this bug.
Please check the last build and let us know about the result.
Also, please clarify which component do you use - .NET, HTML5, Flash?
Thank you.
We couldn't reproduce this bug.
Please check the last build and let us know about the result.
Also, please clarify which component do you use - .NET, HTML5, Flash?
Thank you.
Re: Problem in Calculation
Hello,
this is sample MRT for what happen can you check it please and tell me.
by the way I'm using .Net
thanks alot.
this is sample MRT for what happen can you check it please and tell me.
by the way I'm using .Net
thanks alot.
- Attachments
-
- WrongCalculation.mrt
- (157.53 KiB) Downloaded 223 times
Re: Problem in Calculation
Hello,
This is rounding accuracy in the .NET:
http://stackoverflow.com/questions/1533 ... in-c-sharp
In this case, please try to use the following code:
Thank you.
This is rounding accuracy in the .NET:
http://stackoverflow.com/questions/1533 ... in-c-sharp
In this case, please try to use the following code:
Code: Select all
decimal PreviousQuantity = 12.3m;
decimal NewQuantity = (-1m * 12m);
decimal TotalQuantity = PreviousQuantity + NewQuantity;
- Attachments
-
- 02.PNG (5.67 KiB) Viewed 2785 times
-
- 01.PNG (6.43 KiB) Viewed 2785 times
Re: Problem in Calculation
Hello,
thanks for your help
but i try to do this by VB language nested of C sharp language but it give me error can't write : decimal or double beforeQuantity
so how i can write same code in vb language nestead of c sharp language?
thanks for your help

but i try to do this by VB language nested of C sharp language but it give me error can't write : decimal or double beforeQuantity
so how i can write same code in vb language nestead of c sharp language?
Re: Problem in Calculation
Hello,
Please try to use the following code:
Thank you.
Please try to use the following code:
Code: Select all
Dim PreviousQuantity As Decimal = 12.3D
Dim NewQuantity As Decimal = (-1D * 12D)
Dim TotalQuantity As Decimal = PreviousQuantity + NewQuantity
Re: Problem in Calculation
Thanks so much it works in correct way right now 

Re: Problem in Calculation
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.