Sql c#Crystal report:数据源对象无效
我正在使用类对象作为Crystal reports的数据源: 我正在使用Crystal report Viewer:Sql c#Crystal report:数据源对象无效,sql,crystal-reports,Sql,Crystal Reports,我正在使用类对象作为Crystal reports的数据源: 我正在使用Crystal report Viewer: Printer.Lavage.Report.LavageReport Report = new Printer.Lavage.Report.LavageReport(); Report.SetDataSource(order); Printer.Lavage.View.LavageReport_FRM LavageReporter = new Prin
Printer.Lavage.Report.LavageReport Report = new Printer.Lavage.Report.LavageReport();
Report.SetDataSource(order);
Printer.Lavage.View.LavageReport_FRM LavageReporter = new Printer.Lavage.View.LavageReport_FRM();
LavageReporter.crystalReportViewer1.ReportSource = Report;
LavageReporter.Show();
但我有个例外:
The data source object is invalid.
报告的数据源必须是其在代码中更改后工作的对象的列表: 替换
Report.SetDataSource(订单)代码>
到Report.SetDataSource(新[]{order})代码>报告的数据源必须是其在代码中更改后工作的对象的列表:
替换Report.SetDataSource(订单)代码>
到Report.SetDataSource(新[]{order})代码>