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

HTML5 Report Viewer Template URL Without AJAX Call

1 Answer 172 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 25 Jan 2016, 09:47 PM
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?

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 27 Jan 2016, 02:10 PM
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
Tags
General Discussions
Asked by
Christopher
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or