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

Unable to launch Report Viewer ASP.NET MVC

6 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kurt
Top achievements
Rank 1
Kurt asked on 29 Oct 2015, 06:20 PM

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

Sort by
0
Kurt
Top achievements
Rank 1
answered on 29 Oct 2015, 08:04 PM

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.

 

 ‚Äč

 

0
Stef
Telerik team
answered on 30 Oct 2015, 12:05 PM
Hello Kurt,

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
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
Kurt
Top achievements
Rank 1
answered on 30 Oct 2015, 01:19 PM

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

 

 

 

0
Stef
Telerik team
answered on 03 Nov 2015, 05:12 PM
Hi Kurt,

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
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
Ledcor Development Team
Top achievements
Rank 1
answered on 02 Dec 2016, 06:07 AM

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.

0
Stef
Telerik team
answered on 02 Dec 2016, 04:29 PM
Hello Dave,

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