LocalReport.SetParameters 方法

Sets report parameter properties for the local report.

命名空间: Microsoft.Reporting.WebForms
程序集: Microsoft.ReportViewer.WebForms (在 microsoft.reportviewer.webforms.dll 中)

语法

声明
用法

参数

  • parameters
    An array of ReportParameter objects that contains a list of the report parameter properties.

备注

The parameters specified for the SetParameters method must be defined in the original report definition.

示例

The following code example shows a report parameter being set to the value of a check box on a form.

private void SetReportParameters() {
   ReportParameter p = new 
      ReportParameter("ShowDescriptions", checkBox1.Checked.ToString());
   this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { p });
}
Private Sub SetReportParameters()
   Dim p As New ReportParameter("ShowDescriptions", _
     CheckBox1.Checked.ToString())
   ReportViewer1.LocalReport.SetParameters(p)
End Sub

另请参见

参考

LocalReport 类
LocalReport 成员
Microsoft.Reporting.WebForms 命名空间