SSRS - Do not want to round a percent

17 views Asked by At

I'm doing division and am getting the desired results:

iif(ReportItems!Textbox14.value <> 0, ((ReportItems!amount.Value / ReportItems!Textbox14.Value) * 100) , 0)

Value returned is 55.58866.

I'm trying to format the value to get a percent with one decimal place but NO rounding. Desired result: 55.5

I am getting 55.6.

I've tried ="#0.#", returns 55.6.

I've changed the division to remove the * 100, and used ="#0.#%' and get the same result.

Any suggestions?

I'm contemplating doing the division in SQL versus SSRS.

1

There are 1 answers

0
Alan Schofield On BEST ANSWER

If you don't need to retain the real value (such as when exporting to Excel) then you can simply multiply the number by 10, then use FLOOR() to return the integer portion, then divide it by 10 again.

e.g.

=FLOOR(Fields!myNumber.Value * 10) / 10

Finally, use format f1 in the textbox's format property to always show 1 decimal place.