【发布时间】:2012-02-09 14:00:11
【问题描述】:
我正在尝试将 (.rdl) 报告文件加载到 Web 报告查看器控件(Visual Studio 2010 控件)中:
//Get the data and
.
.
//Add it to report
ReportViewer.LocalReport.DataSources.Add(new ReportDataSource(element.Name, dt));
//Pass the report to the viewer
using (FileStream stream = new FileStream(ReportDocument.FileName, FileMode.Open))
{
this.ReportViewer.LocalReport.LoadReportDefinition(stream);
}
我是否在某处遗漏了一行代码?我使用了 winforms 报表查看器的等效方法,并添加了 RefreshReport() - 但是我找不到 Web 报表查看器的等效方法)。页面仍然空白 - 我错过了什么?
【问题讨论】:
标签: asp.net visual-studio web-applications reporting-services