Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.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
.net 将DevExpress XtraReport绑定到IList时为空报告_.net_Devexpress_Xtrareport - Fatal编程技术网

.net 将DevExpress XtraReport绑定到IList时为空报告

.net 将DevExpress XtraReport绑定到IList时为空报告,.net,devexpress,xtrareport,.net,Devexpress,Xtrareport,因为XtraReport设计器不支持对象数据源,所以我首先使用了一个DB表来模拟报表数据的数据结构,而报表就是这样工作的。然而,当我尝试在代码中分配数据源时,如下面所示,我得到一个空报告。我可能做错了什么 _report.DataSource = ProductionDataHelper.GetReportData(deptId, deptDateFilter.SelectedStartDate ?? DateTime.Now).OrderBy( r => r.De

因为XtraReport设计器不支持对象数据源,所以我首先使用了一个DB表来模拟报表数据的数据结构,而报表就是这样工作的。然而,当我尝试在代码中分配数据源时,如下面所示,我得到一个空报告。我可能做错了什么

_report.DataSource =
    ProductionDataHelper.GetReportData(deptId, deptDateFilter.SelectedStartDate ?? DateTime.Now).OrderBy(
        r => r.DeptDisplayIndex ?? int.MaxValue).ThenBy(r => r.KpiDisplayIndex ?? int.MaxValue).ThenBy(r => r.Category);
KpiReportViewer.Report = _report; 

我已经将设计时
DataSource
属性设置为null,并且我知道
GetReportData
可以工作,因为来自Telerik的上一个报告组件显示了一个四页的报告。报告日期返回EF查询的
ToList
结果。

注意,不能使用基于XtraReport中
IEnumerable
接口的集合。支持集合实现
IList、IBindingList
ITypedList
接口。

无论如何,你不应该在这里等待解决方案,而应该在这里等待。如果问题存在,它将被解决,或者您将得到解决方案。

谢谢@Dmitry,我也会在那里报告这个问题,但我在我的帖子中说我正在将调用
ToList
的结果传递给报告;此结果属于List类型,它实现了
IList