c#报表原生报表子报表
public frmCawbReport(ScanCawb sc, double pageWidth, double pageHeight) { InitializeComponent(); var report = new LocalReport { EnableExternalImages = true, ReportEmbeddedResource = "Managistics.PrintClient.RDLC.ScanSheet.CawbReport.rdlc" }; report.DataSources.Add(new ReportDataSource("DataSet1", sc.printSheet)); report.SubreportProcessing += delegate (object sender, SubreportProcessingEventArgs e) { e.DataSources.Add(new ReportDataSource("DataSet1", sc.printElectronic));//子报表数据源 }; PageWidth = pageWidth / 100; PageHeight = pageHeight / 100; LocalReport = report; }
指定子报表名称