Report Viewer not showing report in MVC aspx view

孤人 提交于 2020-01-03 03:01:35

问题


From the couple of days I am trying to create rdlc report in MVC 4. I just make a test Controller and ReportTest its action that return view. when I hit this url /test/ReportTest report page is opened but only header page is displayed as attached. when I try to observe this page behaviour in firebug it firebug shows a error message.

[HttpGet]
    public ViewResult ReportTest()
    {
        return View("MyReports");
    }

this only happen when I am trying through controller. If I place report files out side the views folder and access this page its working fine as desired. Please help me out to resolve this issue. I am working on MVC 4 with aspx view engine + SQL Server 2008 R2


回答1:


ReportViewer is a server side control, as used in WebForms. When you move it outside your Views folder, it uses the WebForms pipeline.

You'll either have to access it as a stand alone page like you are when moving it outside the Views folder or from an iframe in your MVC page.



来源:https://stackoverflow.com/questions/14939062/report-viewer-not-showing-report-in-mvc-aspx-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!