Division broken?

Stimulsoft Reports.Net discussion
Post Reply
TestBoy
Posts: 34
Joined: Tue Oct 23, 2018 8:14 pm

Division broken?

Post by TestBoy » Mon May 13, 2019 5:25 pm

Consider the following:

Code: Select all

{ 17 / 40 }
All I ever get is 0.

I expect 0.425

Tried Div()
No change. Still 0.

What am I missing? It's SO SIMPLE it's infuriating :(
Attachments
division.mrt
(5.2 KiB) Downloaded 9 times
Lech Kulikowski
Posts: 1526
Joined: Tue Mar 20, 2018 5:34 am

Re: Division broken?

Post by Lech Kulikowski » Mon May 13, 2019 9:57 pm

Hello,

In your case, you should use:
{ 17m / 40m }

please check the following article:
https://docs.microsoft.com/en-us/dotnet ... ypes-table

Thank you.
TestBoy
Posts: 34
Joined: Tue Oct 23, 2018 8:14 pm

Re: Division broken?

Post by TestBoy » Tue May 14, 2019 3:55 am

I get it now.

I did not know that it behaved the wave way as .Net did with regards to decimals.
Now I know.
Thanks.
Lech Kulikowski
Posts: 1526
Joined: Tue Mar 20, 2018 5:34 am

Re: Division broken?

Post by Lech Kulikowski » Tue May 14, 2019 6:59 am

Hello

Please let us know if you need any additional help.

Thank you.
Post Reply