Displaying Percentage

  • So I created a report that has a parameter where the user can enter a percentage value. From what I know, the user cannot just enter 50% and be done with it, the user has to enter .50 to get 50%.

    However, the pecentage value is also displayed on the report, but it displays as .50. I'm wanting it to display 50%.

    What kind of expression can I use for the value to display 50 instead of .50?

    Thanks!

  • You could just do value * 100 which would be 50 for .50

  • Thanks for the reply. This is what I did after I posted the question.

    I made a huge IIF statement in the textbox:

    IIF(Parameters!Percentage.Value = "0.50", "50",

    IIF(Parameters!Percentage.Value = "0.51", "51",

    and so on.......

    I did this 1-100/ .01-1. I didnt type it out invidually, I used excel and was completed in a matter of seconds. Hopefully I dont have any other reports like this. So far, this is a one time thing.

  • DarthBurrito (11/9/2011)


    Thanks for the reply. This is what I did after I posted the question.

    I made a huge IIF statement in the textbox:

    IIF(Parameters!Percentage.Value = "0.50", "50",

    IIF(Parameters!Percentage.Value = "0.51", "51",

    and so on.......

    I did this 1-100/ .01-1. I didnt type it out invidually, I used excel and was completed in a matter of seconds. Hopefully I dont have any other reports like this. So far, this is a one time thing.

    It certainly is easier to read and maintain if you do the mulitplication vs. 100 IIF statements.

  • Or Reporting Service has a field format of percent which would show 0.5 as 50%.

  • Gazareth (11/9/2011)


    Or Reporting Service has a field format of percent which would show 0.5 as 50%.

    I saw that and tried it, but didnt display what I wanted. Not sure why not.

  • What did it show?

  • If you right click on the field and format it to Percentage (Percentage option is under 'Number' section of the properties). It will definitely show the 0.50 as 50%. May be the values that are in the column are smaller than you were expecting so add few decimals to the percentage format and you end up seeing the %

    Good luck

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply