ASP.NET中如何将CrystalReportViewer的ReprotSource设为一个ReportDocument对象?
根据MSDN我这样写代码(看下面),但使运行引发异常,异常信息:“无效的报表源”。
这是我的代码:
ReportDocument oRpt = new ReportDocument();
oRpt.Load("E:\\My Reports\\UserInfo.rpt");
CrystalReportViewer1.ReportSource = oRpt;
我用的Crystal Reports 版本使9.0。