outlookrperson
outlookrperson

Reputation: 2821

Report (RDLC) Localization/Globalization

[VS2010/ASP.NET Web Forms]

Hi,

In a report (RDLC) I need to provide localization/globalization in two languages (pt-BR and en-US) to the following elements: - Labels/Captions (fixed text) - Report Viewer UI interface (buttons and tooltips to controls like find, next, previous, etc.). - fields formating, according to the current culture

What is the best way to achive this?

Thanks!

Upvotes: 8

Views: 16096

Answers (2)

Jr. Pacheco
Jr. Pacheco

Reputation: 47

Do rigth click in your .rdlc report (blank place). In properties, set the Languague option to you country culture.

enter image description here

Upvotes: 1

Tj Kellie
Tj Kellie

Reputation: 6476

I have had success with localizing reports by feeding in the culture I would like to display as a parameter to the report. Here is the basic outline:

  1. Setup a report parameter that represents the culture code you want to display. Let's call it pReportCulture. I set a static value as a default for "en-US"

  2. Set the Language of your report to the value of the parm : Language =Parameters!pReportCulture.Value. This should setup the culture of all textboxes etc in the report.

  3. Make sure to put a date or currency format on fields that you localize. Use the .toString("c") or other valid formats. If you do any custom text parsing you will lose the auto localization from the culture setting.

That should take care of most the the localization display.

Upvotes: 11

Related Questions