Format number in ssrs report

Argh!

I can not stand that I can not understand it myself ....

I used this in number formatting in my report:

'€' #,0.00;('€' #,0.00) 

and this format is € 1,212.89

which is not exactly what I want, because I want € 1,212.89 regardless of the regional settings of the server.

So i tried this

 '€' #.0,00;('€' #.0,00) 

but it gives me the following: 1.212.890

Introducing this, I understand that I do not know what # and are. and the average value in the format string .....

+7
source share
7 answers

Here you can find the definition of the dynamic behavior of the comma and period: http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

I think the best way to reliably get what you want is to hardcode the locale in the expression for this field.

 = (new Decimal(11123.55)).ToString("€#,0.00;(€#,0.00)", new System.Globalization.CultureInfo("es-ES")) 

It will always use a comma as a decimal, and the period is millions, thousands, etc.

There are ways to be more dynamic and always return client data to the local format, which is usually preferable.

+7
source

I know this is an old thread, but in case someone needs it, there is the easiest and most correct way to do this:

  • Right-click the text box of your expression
  • Select Number in the Text Box Properties pop-up.
  • In the "Category" section, select "Number"
  • Check "Use separator 1000
  • Click OK

To "configure" your separator "1000":

  • Select the text box of your expression
  • In the properties on the right, apply the correct culture in the Language property. For example. Choose fr-CH to have 123'456, otherwise 123,456 is used as the default delimiter in English.
+4
source

Try it. It will format your value to the correct number of decimal places.

 =format(1212.89,"€#,#.00") 
+3
source

For Indian currency, in the value of the field use as = Format (Fields! ServiceTaxAmt.Value, "##, ##, ##, ###. 00") and change the language value to hi-in for the report property.

+1
source

You can use the format € #, 0.00 and set the language of your report for de-DE by clicking outside the report area, and in the right panel of properties go to the Localization β†’ Language section.

0
source

This works correctly with [setting the language as hi-IN and Format as "##, ##, ##, ###. 00"]

Rate your efforts

The same can be achieved by following these steps

  • Go to Text Box Properties.
  • Select a room category in the Number tab
  • Check the box next to [Use 1000 separator (,)]
  • Click ok
0
source
 Please help, Ex. Database CurrencyCode value is 1802.51 I want to show CurrencyCode for 'EUR' like **€1.802,51** or ssrs report in Switch condition =SWITCH( Fields!CurrencyCode.Value = "USD", "'$'0.00;('$'0.00)" ,Fields!CurrencyCode.Value = "EUR","'€'0.00;('€'0.00)" ) 
0
source

All Articles