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

404 when viewing report

5 Answers 459 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ewald
Top achievements
Rank 1
Ewald asked on 15 Aug 2015, 03:24 PM

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> ";

5 Answers, 1 is accepted

Sort by
0
Ewald
Top achievements
Rank 1
answered on 16 Aug 2015, 04:35 AM
Forgot to add the fiddler trace: http://1drv.ms/1TIlkbu
0
Walter
Top achievements
Rank 1
answered on 18 Aug 2015, 08:56 AM

Hi Ewald,

 Did you manage to find the ​cause for this issues? I'm currently experiencing the exact same problem.

 Thanks,

0
Stef
Telerik team
answered on 18 Aug 2015, 03:19 PM
Hi everyone,

Please test if the service is set based on How To: Add Telerik Reporting REST Web API to Web Application, and perform the test suggested in the article.

Then verify there are no overlapping routes registered for WebAPi controllers. You can change the default routes for the Reporting REST WebAPI just in case - How to change the registered by default Telerik Reporting REST Web API routes.

Finally, check which folder is mapped on the server by the ReportFileResolver and make sure the TRDX file is placed in this folder (the file must be requested with its full name and extension).


If the error still occurs, please open a support ticket and send us a demo project that we can test locally.

Regards,
Stef
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
Ewald
Top achievements
Rank 1
answered on 21 Aug 2015, 06:20 AM
Created ticket 963835: http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=963835
0
Accepted
Stef
Telerik team
answered on 25 Aug 2015, 01:35 PM
Hello Ewald,

After revising the provided demo project it looks like you need to register the routes for the Reporting REST service, enable CORS and add the required by the viewer JS and CSS files on the page.

More details can be found in the mentioned support ticket #963835.

Regards,
Stef
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
Tags
General Discussions
Asked by
Ewald
Top achievements
Rank 1
Answers by
Ewald
Top achievements
Rank 1
Walter
Top achievements
Rank 1
Stef
Telerik team
Share this question
or