rdlc子报表的问题
this.ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(SubreportProcessingEventHandler);
void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
{
if (!IsPostBack)
{
DataTable dt = Rdlc.testDt(ReportId);
ReportDataSource dtGc = new ReportDataSource("GcDt", dt);
e.DataSources.Add(dtGc);
.....
问题是如果我主报表里有5个子报表
DataTable dt = Rdlc.testDt(ReportId);
ReportDataSource dtGc = new ReportDataSource("GcDt", dt);
e.DataSources.Add(dtGc);
这段代码会被执行5次,这如何避免呢。谢谢指数!!!
------解决方案--------------------
有五个子报表,子报表不要传参数吗!
还有有啥特别的意思撒!