HV-Lima Peru

Offshore your .NET/SQL Development to Latin America! Languages: en-de-es

How to set the Report User Language OnInit depending on the Client’s Culture?

Create a Workinglanguage Parameter with default value of =code.getLanguage(user!Language)

Create the following User Code:

Public initLanguage As String

Protected Overrides Sub OnInit()
    initLanguage = Report.User!Language
End Sub

Public Function getLanguage(ByVal userLang As String) As Integer
    If instr(userLang, "en") Then Return 1
    If instr(userLang, "de") Then Return 2
    If instr(userLang, "fr") Then Return 3
    If instr(userLang, "it") Then Return 4
    Return 1
End Function

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

%d bloggers like this: