Multilingual Value Formats in SSRS

SSRS renders DateTime and floating-point values according a given Culture depending on

  • the Language definition of the report
  • the browser’s language settings
  • URL parameters
  • the current day of week (and whether DST applies or not)

as stated in this TechNet article.

This is all a bit unreliable for my taste, so I looked for a more deterministic method to generate my reports. (I need to add that the reports I am working on already required a “language” parameter, since the data is stored in several languages, and the language parameter is needed to generate the correct data set.)

Solution 1: add a CultureInfo parameter

I added a text parameter name CultureInfo to the .rdl that requires the user to input a CultureInfo value (such as en-us, or de-de, etc.). For this CultureInfo value to be used as default format provider for the report, we need to assign the report’s Language property:

  • select the report by clicking outside the page area in designer mode
  • go to the property sheet, select “Language”
  • click the dropdown button, select “<Expression…>”
  • enter “=Parameters!CultureInfo.Value”

When previewing or running the modified report, the CultureInfo parameter needs to be set, and datetime and float values are displayed according to the culture’s formats.

1 thought on “Multilingual Value Formats in SSRS

  1. Pingback: Multilingual Value Formats in SSRS (Part 2) | devioblog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.