ServerReport.SetParameters Method

Sets report parameter properties for the report.

Namespace: Microsoft.Reporting.WebForms
Assembly: Microsoft.ReportViewer.WebForms (in microsoft.reportviewer.webforms.dll)

Syntax

'Declaration
Public Overrides Sub SetParameters ( _
    parameters As IEnumerable(Of ReportParameter) _
)
'Usage
Dim instance As ServerReport
Dim parameters As IEnumerable(Of ReportParameter)

instance.SetParameters(parameters)
public override void SetParameters (
    IEnumerable<ReportParameter> parameters
)
public:
virtual void SetParameters (
    IEnumerable<ReportParameter^>^ parameters
) override
public void SetParameters (
    IEnumerable<ReportParameter> parameters
)
public override function SetParameters (
    parameters : IEnumerable<ReportParameter>
)

Parameters

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

Remarks

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

Example

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

See Also

Reference

ServerReport Class
ServerReport Members
Microsoft.Reporting.WebForms Namespace