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

Configuring ReportViewer for MVC

1 Answer 428 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 27 Aug 2015, 01:13 PM

I have a MVC project. I created a report successfully, but I can't get a report viewer to work.  In my view I have the line

@(Html.TelerikReporting().ReportViewer()

​When I run the project, I get the error

CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'TelerikReporting' and no extension method 'TelerikReporting' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)

I've tried setting CopyLocal = True on all the Telerik references, copied all the Telerik reporting files to the bin folder, added using lines to the view, but nothing seems to work.  I'm about to give up on Telerik reporting.  Any suggestions on what I can do to get this to work?

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 28 Aug 2015, 03:27 PM
Hello Dan,

We posted a reply to your question in your support ticket on the same topic:

"We found and fixed the following issues in your code:

- The referenced Telerik Reporting DLLs are of different versions. Such setup will not work correctly. You need to run the Upgrade Wizard to upgrade the Telerik.ReportViewer. and the rest of the Reporting assemblies.

- The view with the Report Viewer does not have jQuery loaded. You need to load the required scripts for the viewer.

- The paths to the Report Viewer resources (template, script, styles) are not correct.

- A good practice is to place the controllers in the Controllers folder, including the ReportsController.

- The syntax of the viewer is not correct.

In general it is not recommended to load different versions of jQuery and Kendo UI in the same project, as this may result in errors in the viewer. Load the scripts from a single place and make sure they meet the viewer's requirements. Currently, you are using an unsupported version of jQuery.

We recommend that you review our documentation articles: HTML5 Report Viewer, MVC Report Viewer, and the official ASP.NET MVC guide, before using code snippets from other projects directly inside your project.
"

Regards,
Nasko
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
Dan
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or