Format Decimal Places in Reporting Services

  • Hi,

    I am trying to format a number field in my report so that the number of decimal places shown is based off another field in my report.

    eg. I have two fields, MyNumber and DecimalPlaces. I want MyNumber to show x number of decimal places where x is the value of the DecimalPlaces field.

    Is this option not available in reporting services?? is the only sort of formating available based off strings such as "0.##"?

    Thanks for your help,

    Carolyn

  • The formatting is based on a string. I haven't tried it but you might be able to use an IIF statement to calculate and create the string on the fly.

     

    Stuart

     

  • Try

    ="#." & String(Fields!DecimalPlaces.Value, "0")

  • Thanks! That didn't quite work, but i wrote my own function to do it using the PadRight string function.

Viewing 4 posts - 1 through 3 (of 3 total)

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