Issue with Round function in ssrs

后端 未结 3 462
失恋的感觉
失恋的感觉 2020-12-22 10:30

I have a issue in SSRS when I use expression to use Round function

I need get the value Round down but always is up

I\'ve the following expresion 3 - (4 *.3

相关标签:
3条回答
  • 2020-12-22 11:02

    if you just need to get a whole number try casting to int it should always round up to the nearest whole number other use Math.Round()

    http://msdn.microsoft.com/en-us/library/aa340227(v=VS.71).aspx

    0 讨论(0)
  • 2020-12-22 11:04

    round(3 - (4 *.32),0,1) will round to 0 decimal places, the 1 indicates rounding down. You could also do the quick and dirty cast to int which will always take the floor.

    0 讨论(0)
  • 2020-12-22 11:24

    Int(3 - (4 *.32)) Will give you 1.

    Making it an int will always "round down", it's quick and easy, but not the best solution necessarily.

    0 讨论(0)
提交回复
热议问题