我有三个数据表,具有不同的列。我想在一个DevExpress报告中显示所有三个数据表。我是DevExpress的新手,所以一步一步的解释非常感谢。
我尝试过以下代码:
report.BeginInit();
report.BeginUpdate();
report.DataMember = "[Contract No]"; // Column [Contract No] is common in all three Datatables
report.DataSource = initial; //"Initial" is Datatable1
DetailReportBand initialReport = report.Bands["DetailReport"] as DetailReportBand;
initialReport.DataSource = initial;
DetailReportBand surv1 = report.Bands["DetailReport"] as DetailReportBand;
surv1.DataSource = dt; // "dt" is Datatable2
DetailReportBand surv2Report = report.Bands["DetailReport"] as DetailReportBand;
surv2Report.DataSource = surv2; //"surv2" is Datatable3
report.FillDataSource();
report.CreateDocument();
ASPxDocumentViewer1.Report = report;
此处“报告”是我用于创建DevExpress报告的外部类的实例。
提前谢谢。