为什么我的报告没有在devExpress XtraReport中显示数据?

时间:2014-06-11 19:01:19

标签: c# winforms devexpress xtrareport

我正在使用devExpress XtraReport在VS2013 C#winform应用程序中创建报告。我正在尝试使用实体框架中的表作为数据源。我尝试使用绑定源,但数据没有显示。

来自我的dataProvider类:

public static List<vwInventoryRequestReport> GetView(int docNo) 
{ 
    var items = new List<vwInventoryRequestReport>(); 
    using (var context = new Sage300Entities()) 
    { 
        var query = from i in context.vwInventoryRequestReports 
                    where i.InventoryRequestHeaderId == docNo 
                    select i; 
        items = query.ToList(); 
    } 

    return items; 
}

来自我的主要课程:

var docNo = Convert.ToInt32(teDocumentNumber.Text); 
var items = DataProvider.GetView(docNo); 
this.bindingSource2.DataSource = items; 
InventoryRequestReport report = new InventoryRequestReport(); 
report.DataSource = items; 
ReportPrintTool tool = new ReportPrintTool(report);

0 个答案:

没有答案