Best report localization approach when using the Report Designer

5 posts, 0 answers
  1. Daniel
    Daniel avatar
    16 posts
    Member since:
    Oct 2007

    Posted 07 Jan 2014 Link to this post

    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
  2. IvanY
    Admin
    IvanY avatar
    417 posts

    Posted 10 Jan 2014 Link to this post

    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.

  3. Daniel
    Daniel avatar
    16 posts
    Member since:
    Oct 2007

    Posted 14 Jan 2014 Link to this post

    Hi IvanY,

    Thanks, this looks like an improved approach. 

    Regards, Daniël
  4. SwanB
    SwanB avatar
    50 posts
    Member since:
    Oct 2006

    Posted 30 May 2018 Link to this post

    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

  5. Nasko
    Admin
    Nasko avatar
    1064 posts

    Posted 01 Jun 2018 Link to this post

    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
Back to Top