Calculation error
-
- Posts: 28
- Joined: Thu Aug 01, 2019 1:22 pm
Calculation error
Hello,
When I calculated division between two fields that I got some error in preview.
Example
val_1=2, val_2=1 => DATA.val_1/DATA.val_2 =1 its working
val_1=1, val_2=2 => DATA.val_1/DATA.val_2 = 0 its not working so be results 0.5
val_1=0, val_2=0=> DATA.val_1/DATA.val_2= its not working there is any show data so be results 0
You will find example report file and data file
Thank you
When I calculated division between two fields that I got some error in preview.
Example
val_1=2, val_2=1 => DATA.val_1/DATA.val_2 =1 its working
val_1=1, val_2=2 => DATA.val_1/DATA.val_2 = 0 its not working so be results 0.5
val_1=0, val_2=0=> DATA.val_1/DATA.val_2= its not working there is any show data so be results 0
You will find example report file and data file
Thank you
- Attachments
-
- Report.mrt
- (9.12 KiB) Downloaded 33 times
-
- New Text Document.csv
- (26 Bytes) Downloaded 34 times
-
- Posts: 5250
- Joined: Tue Mar 20, 2018 5:34 am
Re: Calculation error
Hello,
We couldn't reproduce the issue. Please clarify what product and version are you use.
Thank you.
We couldn't reproduce the issue. Please clarify what product and version are you use.
Thank you.
-
- Posts: 28
- Joined: Thu Aug 01, 2019 1:22 pm
Re: Calculation error
Hello,
Version is Stimulsoft Designer v2022.4.2 and you will find screen shots also all of them types integer
Thank you
Version is Stimulsoft Designer v2022.4.2 and you will find screen shots also all of them types integer
Thank you
- Attachments
-
- XP7nYJgtrz.jpg (16.56 KiB) Viewed 430 times
-
- FZXzqutJ0J.jpg (37.18 KiB) Viewed 430 times
-
- 5ZahpprG6b.jpg (7.37 KiB) Viewed 430 times
-
- Posts: 5250
- Joined: Tue Mar 20, 2018 5:34 am
Re: Calculation error
Hello,
Please check the following expression:
{(val_2!=0 ? val_1/val_2 : 0)}
Thank you.
Please check the following expression:
{(val_2!=0 ? val_1/val_2 : 0)}
Thank you.
-
- Posts: 28
- Joined: Thu Aug 01, 2019 1:22 pm
Re: Calculation error
Hello,
Thank you for response. I understood your answer and I will try it. How can I use when val_1=1 lower than val_2=2 ? Because it's result be 0.
Thank you.
Thank you for response. I understood your answer and I will try it. How can I use when val_1=1 lower than val_2=2 ? Because it's result be 0.
Thank you.
- Attachments
-
- 9v3egtzIrm.jpg (14.5 KiB) Viewed 417 times
-
- Posts: 5250
- Joined: Tue Mar 20, 2018 5:34 am
Re: Calculation error
Hello,
Your column is Int, please change it on the decimal, for example.
Thank you.
Your column is Int, please change it on the decimal, for example.
Thank you.
-
- Posts: 28
- Joined: Thu Aug 01, 2019 1:22 pm
Re: Calculation error
Hello,
I tried your method and it worked.
Thank you
I tried your method and it worked.
Thank you
-
- Posts: 5250
- Joined: Tue Mar 20, 2018 5:34 am
Re: Calculation error
Hello,
You are welcome.
You are welcome.