有没有办法在ASP.net MVC视图上放置SQL Server Reporting Services报表查看器控件?如果不是......实现这一目标的最佳方法是什么?
我想在ASP.NET Core MVC 项目中使用Reporting Services ReportViewer控件.
该解决方案在其他建议答案到一个Web窗体添加到项目中.
但是,由于ASP.NET Core 不支持webforms,我无法将控件添加到webform.
是否有任何其他解决方法可能有助于我在ASP.NET Core Web应用程序中使用ReportViewer控件?
reportviewer asp.net-core-mvc asp.net-core reportviewerformvc
我正在研究一个需要使用ReportViewer从SSRS呈现远程报告的MVC4应用程序.在这个论坛的帮助下,我设法让页面在MVC下呈现,但回调不起作用(加载初始页面).导出报告工作正常(并提供所有页面).当我检查页面时,我注意到更改页面后出现以下错误:
未捕获的Sys.WebForms.PageRequestManagerParserErrorException:Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器收到的消息.
我发现这篇关于组合MVC和Web窗体的文章,但由于没有更多的主布局页面,它看起来已经过时了.这与如何在asp.net mvc 3 razor视图中使用reportviewer控件有关但不重复?因为那篇文章仅适用于本地报道.我已经尝试将AsyncRendering更改为true和false.如果为true,则根本不加载.任何建议将不胜感激.
我见过很多人说使用iframe或新页面来显示ReportViewer控件.有没有办法在不使用iframe的情况下与我的页面的其余部分一起显示控件?
我有asp.net MVC2应用程序.我正在使用VS2008,并希望将生成的报告从我的控制器连接到reportviewer.
有任何想法吗?
到目前为止我有这个代码"控制器"
//should pass data to report
public ActionResult GenerateReport()
{
LocalReport report = new LocalReport();
report.ReportPath = Server.MapPath("~/Reports/KingsCourt.rdlc");
List<InvoiceRow> rows = new List<InvoiceRow>();
rows.Add(new InvoiceRow { name = "Testing item", value = (decimal)25.85 });
rows.Add(new InvoiceRow { name = "Testing item2", value = (decimal)5.15 });
ReportDataSource source = new ReportDataSource("InvoiceRow", rows);
report.DataSources.Add(source);
ViewData["InvoiceRow"] = report;
return View();
}
Run Code Online (Sandbox Code Playgroud)
和查看页面:
<form id="form1" runat="server">
<h2>GenerateReport</h2>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="400px" Width="400px">
<LocalReport ReportPath="Reports\KingsCourt.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="InvoiceRow" /> …Run Code Online (Sandbox Code Playgroud)