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

HTML Report Viewer Issues

7 Answers 1231 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 30 Nov 2016, 02:05 PM

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?

7 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 30 Nov 2016, 02:08 PM

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>

 

0
Stef
Telerik team
answered on 30 Nov 2016, 04:50 PM
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
0
manish
Top achievements
Rank 1
answered on 14 Aug 2017, 02:23 AM
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/ 
0
Nasko
Telerik team
answered on 16 Aug 2017, 02:12 PM
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
0
Venkat
Top achievements
Rank 1
answered on 12 Jun 2018, 09:19 AM

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 = /reports/resources/templates/telerikReportViewerTemplate-).

can you please help on this.

 

0
Nasko
Telerik team
answered on 15 Jun 2018, 08:25 AM
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
0
Karthic
Top achievements
Rank 1
Veteran
answered on 12 May 2020, 11:18 AM
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Stef
Telerik team
manish
Top achievements
Rank 1
Nasko
Telerik team
Venkat
Top achievements
Rank 1
Karthic
Top achievements
Rank 1
Veteran
Share this question
or