I have 4 reports Report A, Report B, Report C and Report D with datasources dsA, dsB, dsC and dsD respectively.
Report A is a Main Report which has the subreport B has a subreport C …
The Report A fills the datasource dsB in the SubreportProcessingEvent with the parameter from ReportA.
i would need an event which is fired for every row in Report B so that I pass parameter from Report B and fill the Report C and C parameter to Report D….
code in SubreportProcessingEventArg
SearchValue = new SqlParameter[2];
SqlConnection thisConnection = new SqlConnection(thisConnectionString);
DataSet thisDataSet = new DataSet();
SearchValue[0] = new SqlParameter("@TPlanId", e.Parameters[1].Values[0]);
SearchValue[1] = new SqlParameter("@ProblemId", e.Parameters[0].Values[0]);
thisDataSet = SqlHelper.ExecuteDataset(thisConnection, "Proc_TP_Goal", SearchValue);
/* Associate thisDataSet (now loaded with the stored procedure result) with the ReportViewer datasource */
ReportDataSource datasource = new ReportDataSource("Goal_Proc_TP_Goal", thisDataSet.Tables[0]);
e.DataSources.Add(datasource);
i was not able to figure out the 3rd and 4th level of event handler any suggestion or examples would be greatly appreciated.
Thanks
I do this, I have a parameter in the sub-subreports that pass the row of the subreport. I hope you understand, if not let me know and I will post a sourcecode.