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?