Reporting services SSRS-ReportViewer LocalReport Set子报表参数值
如何以编程方式设置子报表的参数?对于顶级报告,您可以执行以下操作: 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") } ); reportViewer.LocalReport.SetParameters ( 新的Microsoft.Reporting.WebForms.ReportParameter[] { 新的Microsoft.Reporting.WebForms.ReportParameter(“参数”、“测试”), 新的Microsoft.Reporting.WebForms.ReportParameter(“ParameterB”,“1/10/2009上午10:30”), 新的Microsoft.Reporting.WebForms.ReportParameter(“ParameterC”、“1234”) } ); 像上面这样传递参数似乎只是将它们传递给顶级报表,而不是子报表Reporting services SSRS-ReportViewer LocalReport Set子报表参数值,reporting-services,reportviewer,Reporting Services,Reportviewer,如何以编程方式设置子报表的参数?对于顶级报告,您可以执行以下操作: reportViewer.LocalReport.SetParameters ( new Microsoft.Reporting.WebForms.ReportParameter[] { new Microsoft.Reporting.WebForms.ReportParameter("ParameterA", "Test"), new Microsoft.Reporting.We
LocalReport允许您处理SubreportProcessing事件。它向您传递SubreportProcessingEventArgs的实例,该实例具有ReportParameterInfo Collection类型的属性。此集合中的值是只读的。将参数添加到父报表,并从父报表(在实际报表定义中)设置子报表参数值。这是我读到的。让我知道它是否适用于您。将参数设置为,并使用formula builder添加父参数。您可以在哪里找到如何完成此操作?请参阅我的答案,这可能会有所帮助