Hello.
I need a full example of a custom html template to customize the tool bar of the html5 report viewer.
I tried this
templateUrl: '/Genesys.POSCommVision.POSWeb/Views/Shared/telerikReportViewerTemplate.html', and I got no error loading it but the report frezes on "loading."
Thanks in advance
10 Answers, 1 is accepted
Hello Fernando,
The HTML5 Report Viewer is fully customizable. What is the desired outcome? Can you give us more details? You can check useful information in the articles below:
- Localization.
Regards,
Neli
Progress Telerik
Thanks for the reply.
I want to show a customize toolbar like in the screenshot. So I searched how to do that and I found the articles that you posted. I've already try it all but no luck.
The report viewer is working as expected but when I want to use a template the result changes. Only shows "loading.."
In the report viewer I have
templateUrl: '/Genesys.POSCommVision.POSWeb/Views/Shared/telerikReportViewerTemplate.html',
In the template I wrote the examples I found in the forums
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Telerik HTML5 Report Viewer Templates</title></head><body> <template id="trv-report-viewer"> <div class="trv-report-viewer"> <div class="trv-nav k-widget"> <ul aria-label="Main menu" class="trv-menu-large k-widget k-reset k-header k-menu k-menu-horizontal" data-role="telerik_ReportViewer_MainMenu" tabindex="1" role="menubar"> <li aria-label="Previous page" class="k-item k-state-default k-state-disabled" role="menuitem"><a data-command="telerik_ReportViewer_goToPrevPage" title="Previous Page" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-seek-w"></i></a></li> <li aria-label="Page number selector" title="Page Number Selector" class="trv-report-pager k-item k-state-default" role="menuitem"> <span class="k-link k-menu-link"><input class="k-textbox" data-role="telerik_ReportViewer_PageNumberInput" type="number"><span> / </span><span data-role="telerik_ReportViewer_PageCountLabel">1</span></span> </li> <li aria-label="Next page" class="k-item k-state-default k-state-disabled" role="menuitem"><a data-command="telerik_ReportViewer_goToNextPage" title="Next Page" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-seek-e"></i></a></li> <li aria-label="Export" id="trv-main-menu-export-command" aria-haspopup="true" class="k-item k-state-default" role="menuitem"> <a title="Export" href="#" data-command="telerik_ReportViewer_export" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-download"></i> <span class="k-icon k-i-arrow-60-down k-menu-expand-arrow"></span></a> <ul data-command-list="export-format-list" id="trv-main-menu-export-format-list" class="k-group k-menu-group" role="menu" aria-hidden="true"></ul> </li> <li aria-label="Print" class="k-item k-state-default" role="menuitem"><a data-command="telerik_ReportViewer_print" title="Print" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-print"></i></a></li> <li aria-label="Zoom in" class="k-item k-state-default" role="menuitem"><a title="Zoom In" href="#" data-command="telerik_ReportViewer_zoomIn" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-zoom-in"></i></a></li> <li aria-label="Zoom out" class="k-item k-state-default" role="menuitem"><a title="Zoom Out" href="#" data-command="telerik_ReportViewer_zoomOut" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-zoom-out"></i></a></li> </ul> <ul aria-label="Compact menu" class="trv-menu-small k-widget k-reset k-header k-menu k-menu-horizontal" data-role="telerik_ReportViewer_MainMenu" tabindex="2" role="menubar"> <li aria-label="Toggle side menu" class="k-item k-state-default k-first" role="menuitem"><a data-command="telerik_ReportViewer_toggleSideMenu" title="Toggle Side Menu" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-reorder"></i></a></li> <li aria-label="Previous page" class="k-item k-state-default k-state-disabled" role="menuitem"><a data-command="telerik_ReportViewer_goToPrevPage" title="Previous Page" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-seek-w"></i></a></li> <li aria-label="Page number selector" title="Page Number Selector" class="trv-report-pager k-item k-state-default" role="menuitem"> <span class="k-link k-menu-link"><input class="k-textbox" data-role="telerik_ReportViewer_PageNumberInput" type="number"><span> / </span><span data-role="telerik_ReportViewer_PageCountLabel">1</span></span> </li> <li aria-label="Next page" class="k-item k-state-default k-state-disabled" role="menuitem"><a data-command="telerik_ReportViewer_goToNextPage" title="Next Page" href="#" class="k-link k-menu-link"><i class="t-font-icon k-icon t-i-seek-e"></i></a></li> </ul> </div> </div> </template></body></html>Hello Fernando,
I noticed that in the reportSource, the report property is set to "1". If it is trdp report, it has to be "1.trdp". For more information, visit How to: Set ReportSource for Report Viewers article. In addition, you can check the attached project where a custom template is used. You will need to:
- add a style for the buttons;
- run the Upgrade Wizard if you are using version different than 13.2.19.1213.
Regards,
Neli
Progress Telerik
Hi, I have no problem loading the report. I do it in the Resolver.
I'll test your example.
No lucky. Perhaps it is due to the location of the file.
The report is in Views/Shared same as the template.
Can both be .vbhtml?
Hello Fernando,
I will need a sample application which demonstrates the problematic behavior, so I can test it and give you further information.
Regards,
Neli
Progress Telerik