如何从嵌入式资源动态加载新报告?我创建了一个报告项目,其中包含作为嵌入式资源的报告。我添加了第二个报告文件并使用以下代码来切换报告:
this.reportViewer1.LocalReport.ReportEmbeddedResource = "ReportsApplication2.Report2.rdlc";
this.reportViewer1.LocalReport.Refresh();
this.reportViewer1.RefreshReport();
执行此代码时,原始报表在报表查看器中仍然可见。
我也尝试过使用
LocalReport.LoadReportDefinition
但结果相同。