SSRS用多文化语言报告

发布于 2024-12-05 06:51:48 字数 108 浏览 5 评论 0原文

我的MS报告服务器带有RDL文件,显示了英语的不错的报告。我有一个与报告查看器的Web应用程序,可以在ASPX页面内显示此报告。

我遇到的问题是我想用多种语言展示相同的报告?我该怎么做?

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 problem i have is I want to show same report in multiple languages?? How would I do it??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一个人的夜不怕黑 2024-12-12 06:51:48

1)将本地化文本存储在数据库中

2)在第二个数据集中选择文本的本地化版本。

3)为用户设置一个参数以选择语言。

4)使用查找功能将文本包括在报告中。

如果您想将本地化系统应用于许多报告,则有用。

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.

最舍不得你 2024-12-12 06:51:48

1) 将自定义函数添加到接受“Section_Name”和“Language”变量(例如“ReportName,French”)并返回本地化文本的自定义代码(Report Properties、Code),例如:

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) 添加一个参数供用户选择语言(在此示例中使用整数作为值)

3) 根据需要引用报告文本框中的代码,例如:

=code.localise("Report_Name")

这将相当快地在单个报告中实现和维护

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

情未る 2024-12-12 06:51:48

为每种语言创建一个报告,并允许用户通过选择不同的报告来选择语言。

这实施起来最快,但可能会使报告的维护变得困难。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文