Make Use Of Culture in SQL Reporting Services Local Reports

When using SQL Reporting services, you can format things such as dates and currency.

However, depending on the situation you might want to:

  1. Show a report with culture X on a computer running culture Y.
  2. Show a report using the same culture settings as the local computer.

To do (1), all you have to do is set the “Language” parameter of the local report in design time.

To get (2) to work, you need to set the Language parameter of the report as the expression “=User.Language”.  This will set the report culture as the culture that the hosting program is running under.

If you have a program that you need to switch between different cultures, you can do so with the following line of code (which changes the culture to “English-Ireland”)

System.Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo(“en-IE”, False)

More information can be found at: http://msdn2.microsoft.com/en-us/library/ms156493.aspx

Advertisements

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 )

Google+ photo

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

Connecting to %s