Update Report Viewer Currency Based On Region

时间:2016-08-23 15:36:08

标签: c# reporting-services

I'm trying to have my report adjust to computer's local region that generates the report. May I ask how abouts do I do that?

I tried two things.

First thing I tried

Set Computer Region Location to be UK and set the field to be an expression

=FormatCurrency(Fields!CurrentBalance.Value,2)

Second thing I tried was Set computer Region to be UK and set the thread culture

System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("en-GB");
Application.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentUICulture = cultureInfo;

using the above methods didn't quite work. I would like to be able to change back and fourth for testing.

1 个答案:

答案 0 :(得分:2)

您可以执行以下操作:

在语言中设置的报告属性:=User!Language

从正在运行的Thread

中选择当前语言

<强>屏幕

Language