SQL Server ROUND and Reporting Services

An interesting point came to my attention today with regards to rounding in SQL Server and its features, in this case Reporting Services.

Let’s take 62.5 as our magic number, as 3 doesn’t illustrate the issue!

In SQL Server Management Studio, we can see the result of the rounding by:

SELECT ROUND(62.5,0) AS Result

and we get the, correct, result:

Now in Reporting Services if we use the round function by:

= ROUND(62.5,0)

We get the incorrect result of 62.

Using the Floor or Ceiling functions won’t achieve the desired result either.

However using the Format property, of the textbox, we can use n0 which produces the correct result of 63!


SQL Server ROUND and Reporting Services

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest