I am trying to show a report in HTML5. I have setup the Web API and I am able to successfully call the API with the xxx/formats and xxx/clients URL. However the next calls, which are clients/{clientid}/parameters and clients/{clientid}/instances are failing with a 404 and no additional information in Fiddler (see attached).
I included the Web API into my existing Web API, so the format of the URL is different than what is documented in the tutorials, but that shouldn't matter.
I have also seen that the 404 may indicate that the report file cannot be found. I have the following setup:
In the controller, I have this statement
Dim
resolver =
New
ReportFileResolver(HttpContext.Current.Server.MapPath(
"~/Reports"
)).AddFallbackResolver(
New
ReportTypeResolver())
and I have in the project location a Reports sub folder which contains the file Report1.trdx
In the Web Application, I build the html that has to be added to the page as following. The most noticeable is the ReportSource which is set to Report1 (I have also tried Report1.trdx with the same result)
Can you help me to set this up?
"<div id=\"reportViewer1\" class=\"k-widget\"> "
+
" loading... "
+
"</div> "
+
"<script type=\"text/javascript\"> "
+
" $(\"#reportViewer1\") "
+
" .telerik_ReportViewer({ "
+
" serviceUrl: \"/api/"
+
"token/"
+ Credentials.getToken(
this
.mainViewModel.connection) +
"/"
+
this
.mainViewModel.connection +
"/"
+
"TelerikReports/\", "
+
" templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.1.15.731.html', "
+
" reportSource: { "
+
" report: \"Report1\" "
+
" } "
+
" }); "
+
"</script> "
;