Localization is a normal requirement for any project accessed around the world, and although Microsoft has not provided a way to add a ‘resx’ fileinto SSRS in order to localize the report , they have provided a way to use custom assembly and through it import the .resx files. After you have created your original report, to localize it you need to do several things. First create a new project – a Class Library with a .dll file and .resx files for the default and any other necessary language(s). Write your code to access the .resx files based on the culture name passed.
The assembly you created then needs to be trusted and deployed in Reporting Services, here are the steps to do it:
1. Copy your .dll , .pdb files and the language folder (en-GB in my case) to the Report Designer folder. The default path for the Report Designer folder is: C:Program FilesMicrosoft Visual Studio 8Common7IDEPublicAssemblies.
2. Launch the Microsoft .NET Framework 2.0 Configuration program from the Administrative Tools section of your Control Panel.
3. Click Configure Code Access Security Policy - > Increase Assembly Trust - >Make changes for this computer -> Next.
4. Click Browse. Browse to the PublicAssemblies folder and select CallCenterReportUtil.dll Click Open, and then click Next.
5. Select This one assembly and click Next.
6. Change the Trust level slider to Full Trust and click Next -> Finish.
7. Also you need to add the language folder and .dll to the c:ProgramFilesMocrosofSQLServerMSSQL.2ReportingServicesReportServerbin folder. (Or to MSSQL.3)
The only thing left to do is to change the static labels in your report to use this new functionality In your report. In order to do this you need to add a reference to the assembly.
1. Open your report , click on Report - > Report Properties - > References and add the assembly you created
2. To localize the table name fields in the report, right click on each textbox and select Expression…. Type:
=AssemblyName. ClassName.MethodName. (“FieldName“, User!Language)
Once you have done this in all table name fields, deploy the report and it should appear in the appropriate language depending on the regional settings of the computer.
Tags: Localization, Reporting, SQL Server, SSRS