report viewer template

11 posts, 0 answers
  1. Christian
    Christian avatar
    5 posts
    Member since:
    Dec 2019

    Posted 09 Dec 2019 Link to this post

    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

  2. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 10 Dec 2019 in reply to Christian Link to this post

    No one?
  3. Neli
    Admin
    Neli avatar
    252 posts

    Posted 11 Dec 2019 Link to this post

    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
  4. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 11 Dec 2019 in reply to Neli Link to this post

    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
  5. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 11 Dec 2019 in reply to Fernando Link to this post

    <!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>
  6. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 12 Dec 2019 in reply to Neli Link to this post

    any suggestions?
  7. Neli
    Admin
    Neli avatar
    252 posts

    Posted 16 Dec 2019 Link to this post

    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
  8. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 16 Dec 2019 in reply to Neli Link to this post

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

    I'll test your example.

  9. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 16 Dec 2019 in reply to Neli Link to this post

    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?

  10. Fernando
    Fernando avatar
    23 posts
    Member since:
    Nov 2011

    Posted 16 Dec 2019 in reply to Neli Link to this post

    Finally. It's working (thank u)  but now I can't see the report until export it.
  11. Neli
    Admin
    Neli avatar
    252 posts

    Posted 19 Dec 2019 Link to this post

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