HTML5 Report Viewer Template URL Without AJAX Call

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    2 posts
    Member since:
    Dec 2013

    Posted 25 Jan Link to this post

    Would there be a possible way to pass the initializer of the .telerik_ReportViewer a template without using an AJAX call? My situation is with a single page application using require for my module loader. This gets minified into a single file, where my report viewer template is located. I would like to be able to pass the report viewer the HTML as a string from require instead of having it use an AJAX call to find the file. Would this be possible, or would you recommend me just referencing the file from outside the bundled application?
  2. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 27 Jan Link to this post

    Hi Christopher,

    As of Q3 2015 the HTML template file can be requested through the Reporting REST service. If you have a custom scenario where the template has to be modified, or you need to change the icons font and the viewer's CSS template, setting the viewer's templateUrl will cause the HTML file to be loaded from the specified location - Providing Templates.

    If you prefer, you can get the content of the telerikReportViewerTemplate(-FA).html file and add it in the page (in a DIV element with the ID of the viewer), before creating the viewer object. The viewer's templateUrl can be set to an empty string.

    Other approach is to request the viewer's HTML file by URL.


    I hope this information helps.

    Regards,
    Stef
    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
  3. DevCraft banner
Back to Top