报告查看器不显示在MVC ASPX查看报告 [英] Report Viewer not showing report in MVC aspx view

查看:155
本文介绍了报告查看器不显示在MVC ASPX查看报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从几天我想创建RDLC报告MVC 4.我只是做一个测试控制器和ReportTest其作用返回视图。当我打这个网址/测试/ ReportTest报告页面被打开,但作为附加仅显示标题的页面。当我尝试观察萤火它萤火此页面的行为显示错误消息。

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");
    }

这只有当我试图通过控制器发生。如果我把报告文件出方的意见,文件夹,访问该页面的根据需要工作的罚款。请帮我解决这个问题。
我工作的MVC 4 ASPX视图引擎+ SQL Server 2008 R2的

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

推荐答案

的ReportViewer是一个服务器端的控制,如使用的WebForms。当您将它的浏览文件夹之外,它使用的WebForms管道。

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

您要么必须像你的浏览文件夹外,或从你的MVC网页的iframe中移动它时,访问它作为一个单独的页面。

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.

这篇关于报告查看器不显示在MVC ASPX查看报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆