开发者

SSRS reports in multi culture language

开发者 https://www.devze.com 2023-04-04 21:55 出处:网络
I have MS Report server with a RDL file showing a nice report in English language. I have a web application with a report viewer to show this report within side a ASPX page.

I have MS Report server with a RDL file showing a nice report in English language. I have a web application with a report viewer to show this report within side a ASPX page.

The proble开发者_如何学Pythonm i have is I want to show same report in multiple languages?? How would I do it??


1) Store the localisation text in a database

2) Select the localised version of the text in a second dataset.

3) Set up a parameter for the user to select the language.

4) Use lookup functions to include the text in the report.

Useful if you want to apply the localisation system to many reports.


1) Add custom function to the custom code (Report Properties, Code) that accepts 'Section_Name' and 'Language' variables (e.g. "ReportName, French") and returns the localised text e.g.:

function Localise(Section as String) as string
  if Report.Parameters!Language.Value = 1 then

        select Section
            case "Report_Name"
                Localise = "Report Name in English"
            case "Report_Description"
                Localise = "Report Description in English"
        end select

elseif Report.Parameters!Language.Value = 2 then

        select Section
            case "Report_Name"
                Localise = "Report Name in French"
            case "Report_Description"
                Localise = "Report Description in French"
        end select

end if

end function

2) Add a parameter for the user to select the language (in this example using integers as values)

3) Reference the code in the report textboxes as required, e.g.:

=code.localise("Report_Name")

This will be fairly quick to implement and maintain over a single report


Create one report per language and allow the user to choose the language by selecting a different report.

This will be quickest to implement but may make maintenance of the report difficult.

0

精彩评论

暂无评论...
验证码 换一张
取 消