HTML Report Viewer Issues

7 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Oct 2016

    Posted 30 Nov 2016 Link to this post

    Im trying to get the Telerik HTML Report viewer to work in an ASP.net web forms app that is named Reports.

    It appears the project being named Reports causes issues for the report viewer.

    Whenever trying to run the ReportViewer.html, I get the error:    Error loading the report viewer's templates.

    (Template = ../api/reports/resources/templates/telerikReportViewerTemplate-html).

    The report setup is as vanilla as I can possibly get it.  

    I replicated the setup of the viewer in a project with a different name, and it works just fine in that project.

    Here's some Code - First time posting, so I hope my code blocks post correctly:

     

    Web config:  Same for both projects.

    <code>

    <location path="Telerik.ReportViewer.axd">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>


      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="WebDAVModule" />
        </modules>
        <!--<handlers>
        <add name="Telerik.ReportViewer.axd_" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=10.2.16.914, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
        </handlers>-->
      </system.webServer>

    </code>

     

     

    ReportViewer.html - This file is in a subfolder named Views in both folders.     Same code in both.   Everything is the same.  Same report file being referenced for both, which both are in the "Reports" subfolder..     Most comments have been removed (for posting) so it isnt so big.

    <code>

        <!--kendo.web.min.js or kendo.all.min.js can be used as well instead of the following custom Kendo UI-->
        <script src="../ReportViewer/js/kendo.subset.2015.3.930.min.js"></script>
        <script src="../ReportViewer/js/telerikReportViewer-10.2.16.1025.min.js"></script>

    .

    .

    .

     <script type="text/javascript">
            $(document).ready(function () {
                $("#reportViewer1")
                    .telerik_ReportViewer({    
                        serviceUrl: "../api/reports",           
                        // templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-10.2.16.1025.html',                  
                        reportSource: {
                            // The report can be set to a report file name (trdx report definition)
                            // or CLR type name (report class definition).
                            report: "AnnualItemReport.trdp"
                        },
                        viewMode: telerikReportViewer.ViewModes.INTERACTIVE,            
                        scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                        scale: 1.0,
                        ready: function () {                    
                        },
                    });
            });
        </script>

    </code>

     

    Is there something about the project (and project class) being named Reports that is screwing up the Telerik REST service or report viewer?

  2. David
    David avatar
    3 posts
    Member since:
    Oct 2016

    Posted 30 Nov 2016 in reply to David Link to this post

    Let's try this again - Cant edit original post:

     

    Web Config.

    <location path="Telerik.ReportViewer.axd"><br>
        <system.web><br>
          <authorization><br>
            <allow users="*"/><br>
          </authorization><br>
        </system.web><br>
      </location><br>
    <br>
    <br>
      <system.webServer><br>
        <modules runAllManagedModulesForAllRequests="true"><br>
          <remove name="WebDAVModule" /><br>
        </modules><br>
        <!--<handlers><br>
        <add name="Telerik.ReportViewer.axd_" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=10.2.16.914, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" /><br>
        </handlers>--><br>
      </system.webServer>

     

     

    ReportViewer.html - This file is in a subfolder named Views in both folders.     Same code in both.   Everything is the same.  Same report file being referenced for both, which both are in the "Reports" subfolder..     Most comments have been removed (for posting) so it isnt so big.

    <p>   <!--kendo.web.min.js or kendo.all.min.js can be used as well instead of the following custom Kendo UI--><br>
        <script src="../ReportViewer/js/kendo.subset.2015.3.930.min.js"></script><br>
        <script src="../ReportViewer/js/telerikReportViewer-10.2.16.1025.min.js"></script></p> <p>.</p> <p>.</p> <p>.</p> <p> <script type="text/javascript"><br>
            $(document).ready(function () {<br>
                $("#reportViewer1")<br>
                    .telerik_ReportViewer({     <br>
                        serviceUrl: "../api/reports",            <br>
                        // templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-10.2.16.1025.html',                   <br>
                        reportSource: {<br>
                            // The report can be set to a report file name (trdx report definition) <br>
                            // or CLR type name (report class definition).<br>
                            report: "AnnualItemReport.trdp"<br>
                        },<br>
                        viewMode: telerikReportViewer.ViewModes.INTERACTIVE,             <br>
                        scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,<br>
                        scale: 1.0,<br>
                        ready: function () {                     <br>
                        },<br>
                    });<br>
            });<br>
        </script></p>

     

  3. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 30 Nov 2016 Link to this post

    Hello David,

    The Telerik.ReportViewer.axd handler is not needed, it is used only by the old ASP.NET WebForms ReportViewer, that is obsolete as of Q3 2015.

    About the reported error, please check HTML5 Viewer Troubleshooting and test to adjust the serviceUrl of the HTML5 Viewer. Also check if the application has read/write access to the configured Reporting REST service's cache storage.

    Regards,
    Stef
    Telerik by Progress
    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. manish
    manish avatar
    24 posts
    Member since:
    Sep 2007

    Posted 13 Aug 2017 in reply to Stef Link to this post

    Folks - is there a step by step or online video on how to use the reporting tools.there are new features introduced every quarter which is understandable but the documentation - atleast i am not finding anything good - to get you started.. the reporting tool seems to be a lot worse than the other controls/ 
  5. Nasko
    Admin
    Nasko avatar
    1070 posts

    Posted 16 Aug 2017 Link to this post

    Hello Manish,

    The main resource for help and assistance with Telerik Reporting is the online documentation and the examples which come pre-installed with the product.
    We do not provide any online video tutorials at the moment.

    Regards,
    Nasko
    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
  6. Venkat
    Venkat avatar
    3 posts
    Member since:
    Nov 2017

    Posted 12 Jun 2018 in reply to Nasko Link to this post

    template not showing the server after publishing the Telerik HTML5 Reports.after publishing the code in server IIS.

    the folder doesn't have the resources folder.

    when we running the solution, I am  getting the error  

    Error loading the report viewer's templates. (Template = api/reports/resources/templates/telerikReportViewerTemplate-html).

    can you please help on this.

     

  7. Nasko
    Admin
    Nasko avatar
    1070 posts

    Posted 15 Jun 2018 Link to this post

    Hello Venkat,

    If the issue is only present after deployment, then it is connected to the IIS configuration.

    The issue might be due to CORS configuration. For more information, please refer to Enable CORS and Enabling Cross-Origin Requests in ASP.NET Web API 2.

    Regards,
    Nasko
    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