I have followed the instructions for adding the Telerik HTML5 MVC Report Viewer Item Template to our MVC application.
I can see all the folders, the reportscontroller and the reportviewerview.
The reportscontroller does not have an action to return the reportviewerview like I am familiar with.
I cannot figure out how to get the controller to show the report viewer. Any help would be greatly appreciated.
Regards,
Kurt
6 Answers, 1 is accepted
I must be an idiot, I cannot get this to work. I created a completely blank MVC project, added the HTML5 MVC Report Viewer Item Template and still cannot get it to work.
What URL path should I be using?
http://server/reports?
http://server/reports/reportviewer?
http://server/reports/reportviewerview1?
? I am completely confused.
Why do I have red squigglies in the reportviewerview1.cshtml?
I have run the report upgrade.
The VS item template of the HTML5 Viewer (MVC Wrapper) will add the report's template files (CSS,JS, HTML), a vbhtml/cshtml file with links to the required CSS, JS files and the viewer object, a sample implementation of the ReportsControllerBase as a WebAPI controller with the corresponding routes registrations in the Global.asax.
You will need to add a standard controller and an action returning the view added by the VS item template. For example if the view is named ReportViewerView.cshtml and you have already a HomeController:
- Move the ReportViewerView.cshtml in the View>Home folder;
- Add an action name ReportViewerView in HomeController, where the action returns a View;
- Make the action the default one on starting the application. Find the RouteConfig and set HomeController and ReportViewerView action as default;
- Run the application and the first loaded view will display the viewer;
I hope this information is helpful.
Regards,
Stef
Telerik
Any thoughts on the red squigglies in my cshtml file? Screenshot attached. I added these references in the file, but it did not fix.
@using MyTelerikProject
@using Telerik.Reporting
@using Kendo.Mvc.UI
@using Telerik.ReportViewer.Mvc
Please test if moving the view file under the Views folder, and adding the namespace declarations in the Views>web.config file resolves the issue.
Also test updating all Nuget packages via VS Nuget Packages Manager and verify the runtime>assemblyBinding section in the root Web.config is properly structured.
If you need further help, feel free to open a support ticket and send us the problematic project to test the settings locally.
Regards,
Stef
Telerik
Hello,
I have same issue as Kurt. I have tried moving viewer to the Views - home folder and all the other recommendation without luck. I am getting this error The resource cannot be found...
Also, @(Html.TelerikReporting().ReportViewer() is showing red squigglies in my cshtml file along with @url
Any help will be appreciated.
I just posted an update in your support ticket regarding the same question.
For anyone interested, here is a demo project and a video that can be previewed in IE browser.
If you need further help, please let us continue the discussion in the opened support ticket.
Regards,
Stef
Telerik by Progress