How to set User!Language programmatically?
Hallo nas_55, Thanks for your answer but I suppose that you did not exactly understand my question. I would like to know if it is possible in some way to set the variable User!Language. Does somebody know if it is possible? Kind regards Daniel
November 19th, 2011 10:36am

Hi Daniel, Thanks for the question and nas_55’s valuable suggestions. As we know, Language is one built-in property of the report, we can control this property’s value by using the expression as nas_55 suggested. Addtinally, if you want to set the report has the same langage as the custom client, please set the Languge property with this expression directly: = User!Language. Thanks, Sharp Wang Please remember to mark the replies as answers if they help you and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
November 20th, 2011 1:57am

Hi Wang, Thanks for your answer. Kind regards Daniel
November 20th, 2011 3:38am

Hallo, Does somebody know if it is possible to set the global variable User!Language based on a parameter? I have a DataSet representing available languages and the default value is set to User!Language. I would like that if a user is switching the language the variable User!Language is overwritten with the user selected language. Does somebody know if it is possible to do it? Kind regards, Daniel
Free Windows Admin Tool Kit Click here and download it now
November 20th, 2011 4:11am

Hi, This is possible, you need to create a parameter and then set some values for the parameter. You can either use a query to create a pick list or create a pick list within the parameter. Then go into the report properties either by pressing F4 or using the menu view and properties window. Find the language field and then click on the drop down and select expression. Your expression should be something like : =iif(Parameters!PARAMETERNAME.Value= "UK" ,"en-GB","en-US") You will have to nest the iff statements to cater for all the other countries. Like this =iif(Parameters!PARAMETERNAME.Value= "UK" ,"en-GB", =iif(Parameters!PARAMETERNAME.Value= "FR" ,"fr-FR","en-US")) Hope this helps.
November 20th, 2011 7:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics