February 6, 2017 at 8:54 am
I have a database column value as 0.923074, and Want to display it as 92.30% on SSRS texbox.
Another example value as 0.030155 and need to display as 3.01
Currently these values are auto rounded and being displayed as 92.31% and 3.02 instead.
Need help to prevent the autoround and display actual 2 positions after decimal.
February 6, 2017 at 9:07 am
Edit reread, will post back an answer.
Edit, try:=FLOOR(Fields!MyField.Value * 10000) / 10000
This preserves the field as a numeric, rather than turning it into a string.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
February 6, 2017 at 9:22 am
Updated. It is worth noting that the values that SSRS is giving you is correct, 0.99995000 = 1 when rounding to 4 decimal places (2 decimal places in percentage format). Thus the logic above.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
February 6, 2017 at 9:26 am
Super..!! This works exactly, as needed. Thank you.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy