All Mod Cons (Multilingual Reports with AS2005)

Based on feedback from a couple of folks, I've decided to make my post titles a bit more descriptive. I'll still use the name of one of the albums in my music collection as the primary title but will also include a description of the actual content of the post (happy, Jason?).

Anyway, one of the cool new features of SQL 2005 Analysis Services is translations. This lets you provide language translations for both the data and the metadata in your cube. When an application connect to the server, it can provide the Locale ID (LCID) of the desired language in the connection string. If the translation is not done, it will use the default one.

To get this working, provide a parameter that allows you to select the language. You could just as easliy bind it to the User!Language global to get the language of the current users. One of the tricks is that Reporting Services uses Language names instead of LCIDs. I had to write a custom function to translate between them:

Public Function GetLCID(Name As String) As Integer
Dim CI As New System.Globalization.CultureInfo(Name)
Return CI.LCID
End Function

I first designed the report using English and then switched to use the GetLCID function in the connection string.

="Data Source=localhost;Initial Catalog=""Adventure Works DW"";Locale Identifier=" & Code.GetLCID(Parameters!Language.Value)

Unfortunately, this only works for the data, not the static text. You would need to write some additional custom expressions for the report text. But it should give you a feel for how to leverage this feature in your own reports.