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

ReportsController

1 Answer 346 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rasmus
Top achievements
Rank 1
Rasmus asked on 30 Nov 2015, 10:38 AM

Hello Telerik,

I've been trying to set up a ReportsController, a WebApi and a view that all talks together. My view is in another project than my ReportsController and WebApi, since they are going to be deployed two different places.
I have followed your guides

 - http://www.telerik.com/help/reporting/html5-report-viewer-embedding.html
 - http://www.telerik.com/help/reporting/telerik-reporting-rest-host-http-service-using-web-hosting.html
 - http://www.telerik.com/help/reporting/telerik-reporting-rest-implementing-http-service.html

 Where I have made sure it worked (by first having the view in same project as the ReportsController and WebApi)

Now that I've split it up in two projects, I get the following warning

"Message": "No HTTP resource was found that matches the request URI 'http://localhost:49375/api/reports/clients'.",
"MessageDetail": "No type was found that matches the controller named 'reports'."

In the Global.asax.cs file, the following lines have been added (just under the AreaRegistration)

GlobalConfiguration.Configure(WebApiConfig.Register);
ReportsControllerConfiguration.RegisterRoutes(GlobalConfiguration.Configuration);

 

What am I doing wrong?

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 02 Dec 2015, 02:29 PM
Hi Rasmus,

If I understand correctly, there are two separate projects:
  1. One containing the Reporting REST service;
  2. One containing the views;

In such case, test the following:
  1. Use the VS item template to add the HTML5 Viewer and Reporting REST service in the project with the service.
  2. Copy only the html/view.aspx with the viewer and paste it in the project with the views. If you are using a wrapper of the HTML5 Viewer (MVC or WebForms), you will need to copy the corresponding assembly in the project with the views (Telerik.ReportViewer.Mvc.dll, Telerik.ReportViewer.Html5.WebForms.dll). All the rest assemblies must remain in the project with the service.
  3. Enable CORS for the Reporting REST service (in the service's project).
  4. Test if the service responds on request for formats - How To: Add Telerik Reporting REST Web API to Web Application (step 8).
  5. Copy the address of the Reporting REST service and use it for the viewer's serviceUrl.


Let us know how it goes. If you need further help, please feel free to open a support ticket and send us a demo project that illustrates the problem.

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
Rasmus
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or