Stimulsoft Web Reports error in calculations
Posted: Mon Jan 11, 2021 11:18 am
Hi,
I am using Stimulsoft for Web reports. One of my reports should display worktime of an employee both in hours and decimal numbers. The numbers come from SQL server, for example 83 mins => converted to hours in decimal 1.38. Thus, I should calculate total hours within a month. I have the logic for calculating hh:mm format of those decimal converted numbers => $"{{(Math.Truncate({expression}) + (({expression} - Math.Truncate({expression})) * 60 / 100))}}". However, when the sum of the mins equal to 420, it is displayed as 6:60 instead of 7:00. Double data type is used for calculations.

When the project was developed with the version 2017.1.6.0, there were not any issues related to the calculations. After updating to 2019.3.4, the problem has come to the surface. Could you, please help with this situation?
Best regards.
I am using Stimulsoft for Web reports. One of my reports should display worktime of an employee both in hours and decimal numbers. The numbers come from SQL server, for example 83 mins => converted to hours in decimal 1.38. Thus, I should calculate total hours within a month. I have the logic for calculating hh:mm format of those decimal converted numbers => $"{{(Math.Truncate({expression}) + (({expression} - Math.Truncate({expression})) * 60 / 100))}}". However, when the sum of the mins equal to 420, it is displayed as 6:60 instead of 7:00. Double data type is used for calculations.

When the project was developed with the version 2017.1.6.0, there were not any issues related to the calculations. After updating to 2019.3.4, the problem has come to the surface. Could you, please help with this situation?
Best regards.