Data retrieval failed for the subreport, 'All_SpecificationRdlcSub', located at:
void LoadReport(int SampleDetails_Id) { ReportViewer1.LocalReport.ReportPath = Server.MapPath("All_SpecificationRdlc.rdlc"); ReportViewer1.LocalReport.EnableExternalImages = true; DataSet dsTata = new DataSet(); DataTable DtChemicalGrading = new DataTable(); DtChemicalGrading = CreateSampleTypeDt(); Chemical_grade objChemical_grade = new Chemical_grade(); DataTable dtChemicalType = objChemical_grade.GetReportData(); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dtChemicalType)); ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(SetSubDataSource); this.ReportViewer1.LocalReport.Refresh(); }
public void SetSubDataSource(object sender, SubreportProcessingEventArgs e) { int Chemical_Grade_Id = 0; int.TryParse(e.Parameters["Chemical_Grade_Id"].Values[0].ToString(), out Chemical_Grade_Id); DataTable dtGrading = new DataTable(); Grading objGrading = new Grading(); dtGrading = objGrading.GetSubReportData(Chemical_Grade_Id); e.DataSources.Add(new ReportDataSource("DataSet1", dtGrading));
DataSet1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)