关于rdlc报表的子报表问题,总是显示未提供子报表数据源实例!高手请教 急!
private void Frm_Report_Load(object sender, EventArgs e) { rptMental.ProcessingMode = ProcessingMode.Local; rptMental.LocalReport.ReportEmbeddedResource = @"Record.Client.Report.chic_Report.rdlc"; rptMental.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); rptMental.LocalReport.DataSources.Add(new ReportDataSource("Ds1_chic_Report", dtchic)); this.rptMental.RefreshReport(); } void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e) { ReportDataSource rs = new ReportDataSource(); rs.Name = "Ds1_chicDetail_Report"; rs.Value = dtchicDetail; e.DataSources.Add(rs); }
ReportDataSource rs= new ReportDataSource(); rs.Name = "Ds1_chicDetail_Report"; rs.Value = dtchicDetail; rptMental.LocalReport.DataSources.Clear(); rptMental.LocalReport.DataSources.Add(rs);