我有 4 个报告报告 A、报告 B、报告 C 和报告 D,数据源分别为 dsA、dsB、dsC 和 dsD。
报表 A 是一个主报表,它有一个子报表 B 有一个子报表 C ...
报表 A 使用来自 ReportA 的参数填充 SubreportProcessingEvent 中的数据源 dsB。
我需要一个为报表 B 中的每一行触发的事件,以便我从报表 B 传递参数并将报表 C 和 C 参数填充到报表 D....
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);
我无法弄清楚事件处理程序的第 3 级和第 4 级,任何建议或示例将不胜感激。
谢谢