Error 404 Resource not found
|Product||Progress® Telerik® Reporting|
|Project Type||Web application|
This article elaborates on an error for not found telerikReportViewer script after creating a new HTML5-based report viewer using the built-in item template wizard. When you create solution structure where the Report Viewer and the Reporting REST Service's hosts are separated, the generated telerikReportViewer script is referenced by relative path. The path is evaluated at run-time against the viewer application host. Instead, it should try to get the resource from the REST Service host. The same applies for scenario where the viewer connects to the Report Server to get the reports.
The error might occur in two cases: 1. In case there is a REST service already configured on a different host. In 'Configure reporting engine' dialog, choosing Rest service option and "Use existing REST service" where you enter a valid REST service URI. 2. In case you are configuring the viewer to work with Report Server. In 'Configure reporting engine' dialog, choosing Report Server option where you enter a valid Report Server URI.
telerikReportViewer:1 Failed to load resource: the server responded with a status of 404 (Not Found) jquery-3.3.1.min.js:2 jQuery.Deferred exception: jQuery(...).telerik_ReportViewer is not a function TypeError: jQuery(...).telerik_ReportViewer is not a function at HTMLDocument.<anonymous> (http://localhost:44395/Home/ReportViewerView1:37:46) at l (http://code.jquery.com/jquery-3.3.1.min.js:2:29375) at c (http://code.jquery.com/jquery-3.3.1.min.js:2:29677) undefined w.Deferred.exceptionHook @ jquery-3.3.1.min.js:2 jquery-3.3.1.min.js:2 Uncaught TypeError: jQuery(...).telerik_ReportViewer is not a function at HTMLDocument.<anonymous> (ReportViewerView1:37) at l (jquery-3.3.1.min.js:2) at c (jquery-3.3.1.min.js:2)
This issue is caused by the fact that since Telerik Reporting R2 2019 (220.127.116.114) release, the viewer dependencies are served by the service.
As this is caused by a relative path to the resource, you can just reference the absolute path to the report viewer script, e.g. replace the generated script path with the following: