This is a migrated thread and some comments may be shown as answers.

Best report localization approach when using the Report Designer

4 Answers 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Development
Top achievements
Rank 1
Development asked on 07 Jan 2014, 10:03 AM
Hi,

In our client-server based application we use the stand-alone Telerik Report Designer tool to create the reports. We store the report definitions as XML (*.trxd) and distribute them to the client apps. This offers great flexibility in creating new on-the-fly reports which have no binary dependency with our application. Also it bypasses the need to compile reports so non-developers are able to create new or change existing reports.

We now need to provide globalization support. The help documentation states an approach to add globalization support to the reports but this seems to work only for code-based reports, not for XML. The Report Designer tool does not offer a "Localizable" property that can be used when creating code-based report definitions.

The best I can think of is to add specific tags in the report definition (e.g. %USERNAME%) and have custom language files. Since I will distribute the reports from the server we can preprocess the reports e.g. to replace text tags. Resx files are a bit restrictive in my scenario because this would create a binary dependency.

Would this be a good approach in my scenario? Or what alternatives would I have?

Regards,
Daniël

4 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 10 Jan 2014, 01:33 PM
Hello Daniel,

Actually resx files can be used but you will have to get rid of the code generated and then set the BuildAction of the file to None and Copy to Output Directory to Copy Always. Then with your own resource manager (using the ResourceManager class of course) you can access any of the created resx files which are simple xml files without rebuilding the solution. Then the naming convention for the resx files would be the name of the report followed by the language, like this: Report1.en.resx. In the resx file you can name the resources after the item names, for example textbox1, textbox2, etc.

I hope that helps.

Regards,
IvanY
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Development
Top achievements
Rank 1
answered on 14 Jan 2014, 08:22 AM
Hi IvanY,

Thanks, this looks like an improved approach. 

Regards, Daniël
0
SwanB
Top achievements
Rank 1
answered on 30 May 2018, 08:51 AM

How can we use you suggestion of using
"our own resource manager (using the ResourceManager class of course) to access any of the created resx files without rebuilding the solution",
when the Telerik Report Designer tool (.trdx files ) are used ?

Regards

SwanB

0
Nasko
Telerik team
answered on 01 Jun 2018, 03:00 PM
Hello SwanB,

The Standalone Report Designer serializes the report definitions in XML but currently no official pattern is available for localizing XML documents. You can create a user function that will accept resource key and optionally string report parameter specifying the culture code. Based on these parameters, localized string resources can be displayed in XML documents.
The approach with a resource manager would have to be implemented entirely on your end. For more information, please refer to the MSDN articles on the topic.

You can also post a request in our Feedback portal.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Development
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Development
Top achievements
Rank 1
SwanB
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or