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

report viewer template

10 Answers 733 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 09 Dec 2019, 08:54 PM

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

Sort by
0
Fernando
Top achievements
Rank 1
answered on 10 Dec 2019, 01:10 PM
No one?
0
Neli
Telerik team
answered on 11 Dec 2019, 09:46 AM

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:

- Templates Overview;

- Templates Structure;

Providing Custom Templates;

Localization.

Regards,
Neli
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
0
Fernando
Top achievements
Rank 1
answered on 11 Dec 2019, 12:43 PM
Hi,
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
0
Fernando
Top achievements
Rank 1
answered on 11 Dec 2019, 12:44 PM
<!DOCTYPE html>
<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>
0
Fernando
Top achievements
Rank 1
answered on 12 Dec 2019, 12:02 PM
any suggestions?
0
Neli
Telerik team
answered on 16 Dec 2019, 12:21 PM

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

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
0
Fernando
Top achievements
Rank 1
answered on 16 Dec 2019, 03:03 PM

Hi, I have no problem loading the report. I do it in the Resolver.

I'll test your example.

0
Fernando
Top achievements
Rank 1
answered on 16 Dec 2019, 08:12 PM

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?

0
Fernando
Top achievements
Rank 1
answered on 16 Dec 2019, 08:35 PM
Finally. It's working (thank u)  but now I can't see the report until export it.
0
Neli
Telerik team
answered on 19 Dec 2019, 09:16 AM

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

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
Christian
Top achievements
Rank 1
Answers by
Fernando
Top achievements
Rank 1
Neli
Telerik team
Share this question
or