Click here to Skip to main content
15,845,436 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)

           string Id = e.Parameters[0].Values[0].ToString();

           List<ReportParameter> parametersSub = new List<ReportParameter>();
           parametersSub.Add(new ReportParameter("Id", Id));

           ReportViewer1.LocalReport.EnableExternalImages = true;
           ReportViewer1.LocalReport.ReportPath = Server.MapPath("SubReportName.rdlc");
           ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsSubReport", this.SqlDataSource));


I am using above code for passing parameter from main report to sub report but this does not works and provides me error. Please advise.
Updated 10-Feb-15 20:15pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900