Tuesday, January 1, 2013

SSRS - Localize Microsoft Report Viewer


Scenario:
We have multi-language site. This site contains a lot of reports presented in different languages. But we have problem. The report viewer, the control which shows report, is English. We need to localize this control. Can you do it?

Answer:
Yes, its so simple.
there is interface called 'IReportViewerMessages'. Via this interface you can change report viewer internal controls value as the following steps:

STEP -1:
Add a class named, for example, 'ReportViewerMessages' which implement 'IReportViewerMessages'.

STEP -2:
Create GlobalResource named 'ReportViewerResource'.


STEP- 3:
Add the following line to your web.config:
<add key="ReportViewerMessages" value="YourClass, YourAssembly" />

Build and run your project and the result will be like the following:





4 comments:

  1. There's also a second and third interface with some more fields and methods for translating. See: http://devillers.nl/localizing-microsoft-reportviewer/

    ReplyDelete