Division broken?

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

Division broken?

Post by TestBoy »

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 137 times
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Division broken?

Post by Lech Kulikowski »

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: 46
Joined: Tue Oct 23, 2018 8:14 pm

Re: Division broken?

Post by TestBoy »

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: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Division broken?

Post by Lech Kulikowski »

Hello

Please let us know if you need any additional help.

Thank you.
Post Reply