如何以编程方式为子报表设置参数?对于顶级报告,你可以做到以下几点:SSRS - ReportViewer LocalReport设置SubReport参数值
reportViewer.LocalReport.SetParameters ( new Microsoft.Reporting.WebForms.ReportParameter[] { new Microsoft.Reporting.WebForms.ReportParameter("ParameterA", "Test"), new Microsoft.Reporting.WebForms.ReportParameter("ParameterB", "1/10/2009 10:30 AM"), new Microsoft.Reporting.WebForms.ReportParameter("ParameterC", "1234") } );
像上面的参数传递似乎只将它们传递给顶层的报告,而不是子报表。
LocalReport允许您处理SubreportProcessing事件。它向您传递了SubReportProcessingEventArgs的一个实例,该实例的类型为ReportParameterInfoCollection。这个集合中的值是只读的。
你在哪里可以弄清楚如何完成这件事? – rsapru 2011-02-16 07:09:32