Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql c#Crystal report:数据源对象无效_Sql_Crystal Reports - Fatal编程技术网

Sql c#Crystal report:数据源对象无效

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

我正在使用类对象作为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 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})