June 26, 2008 at 3:27 am
Hi
I have columns of type decimal with a precision of 9, in the table it adds all the zeros to make up the 9 places after the decimal place, so it stores values as follows:
123.458000000
29.787844000
102.000000000
In Reporting Services I only want to display the values to the precision of 4, but if there are less then 4 decimal places the zeros must be removed up until 2 zeros. Hope this makes sense. See below:
123.458
29.7878
102.00
At the moment I am doing this in my SP that returns the data for the report by rounding the decimal to 4 places, then converting to varchar and replacing the zeros with blank spaces, but if all zeros are gone I must add 2 again.
I am sure this is not the best way of doing this? Does anyone know of a better approach either in my SP or in Reporting Services?
Thanks
MB
June 26, 2008 at 8:05 am
Set format on cell(s) column(s) or row(s) to ##0.00##
June 26, 2008 at 9:09 am
Thanks Andrew, much appreciated! 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply