C#中的多语言报告 [英] Multi-language report in C#
问题描述
我正在用C#(本地报告)编写报告应用程序.我已经制作了报告模式(rdlc文件),现在由于用户的本地化,我试图使它们自动翻译.我已经设法用资源文件进行了一次翻译(一个字段的翻译,但是有很多翻译),但这需要我在报表中使用的每个文本框的参数:
I'm writing reporting application in C# (local reports). I've made report patterns (rdlc files) and now I'm trying to make them autotranslating due to localization of user. I've managed to make a single translation (translation of one field, but there are many of them) with resource file, but this requires parameter to every textbox I use in report :
ReportParameter p = new ReportParameter("Report1Parameter3", GlobalStrings.FieldText);
this.reportViewer1.LocalReport.SetParameters(p);
有什么方法可以使它比每个文本字段都使用附加参数更直接"?
Is there any way to make it more "direct" than using additional parameter for every text field?
推荐答案
我认为您应该将所有字段都放入数据集中,并在为每个用户绑定数据之前进行翻译.
I think you should put all field to your dataset, and process translate before bind data for every user.
这篇关于C#中的多语言报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!