如何以編程方式爲子報表設置參數?對於頂級報告,你可以做到以下幾點: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