Share via


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 名前空間