我将实体框架数据集传递给RDLC,输出不是我期望的顺序。下面是我的代码,我希望输出按CarName列排序,但不按该顺序呈现。我错过了什么?
BF_Model db = new BF_Model();
IQueryable<vwAllExportLog> dsEDIReports_EF_vwAllExportLog;
dsEDIReports_EF_vwAllExportLog = from c in db.vwAllExportLog
let mydate2 = new DateTime(2014, 7, 17)
where c.Production == true
&& c.RunDate >= mydate2
orderby c.CarName, c.CltName, c.RunDate
select c;
//provide local report information to viewer
reportViewer1.Reset();
reportViewer1.LocalReport.ReportPath = @"D:\Development\EDIReports_EF\EDIReports_EF\Reports\ExportsGroupedByCarrier.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsEDIReports_EF_vwAllExportLog", dsEDIReports_EF_vwAllExportLog));
reportViewer1.LocalReport.Refresh();
//load report viewer
reportViewer1.RefreshReport();