tl_tlsoft_Qlcheck_qlReport report = new tl_tlsoft_Qlcheck_qlReport();
string tmpurl = Application.StartupPath + "\\report\\Report1.repx";
report.LoadLayout(tmpurl); //为存储到根目录下报表
report.FindControl("tableCell24", false).DataBindings.Add(new DevExpress.XtraReports.UI.XRBinding("Text", datb, "qlname", ""));//tableCell24单元格
1.DetailReport
DetailReportBand DetailReport = report.FindControl("DetailReport3", true) as DetailReportBand;
2.Detail
DetailBand Detail1 = report.FindControl("Detail4", true) as DetailBand;
3.动态绑定
DataTable datb = QlbaseSER.QueryTAB().Tables[0];
DetailReport.DataSource = datb;//查询出的表 DataTable
DetailReport.DataMember = "ds";//表的名称
ReportPrintTool tool = new ReportPrintTool(report);
tool.ShowPreview();