Data retrieval failed for the subreport, 'Subreport2', located at: ###Path###. Please check the log files for more information.
public ActionResult Index(){ reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"Reports\" + _rptFileName + ".rdlc"; reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dsDocuments", GetDataAsObjectOfReport().TableA)); reportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); reportViewer.LocalReport.Refresh(); } public void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e) { int documentID = Convert.ToInt32(e.Parameters["ID"].Values[0].ToString()); ReportDataSource rds = new ReportDataSource() { Name = "dsReplies", Value = GetDataAsObjectOfReport().TableB.Where(x => x.DocumentID == documentID).ToList() }; e.DataSources.Add(rds); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)