Crystal Report(绑定到datatable)没有表错误

时间:2014-05-13 07:10:07

标签: c# datatable crystal-reports dataset

我有数据表dt,我将它绑定到水晶报告

CustomReport rpt = new CustomReport();
DataSet ds = new DataSet();
ds.Tables.Add(this.dt);
rpt.SetDataSource(ds);

我即使犯了The report has no tables错误

enter image description here

我先得到了什么。我使用DataTable直接看到SetDataSource方法的正确重载。但是我得到了同样的错误,经过搜索后我发现了它的建议'到create new dataset at runtime and add your DataTable to the dataset before calling SetDataSource method

任何指针都非常受欢迎

0 个答案:

没有答案
相关问题