ServerReport.SetParameters Method (IEnumerable<ReportParameter>)

 

Sets report parameter properties for the report.

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

public override void SetParameters(
	IEnumerable<ReportParameter> parameters
)

Parameters

parameters
Type: System.Collections.Generic.IEnumerable<ReportParameter>

An T:System.Collections.Generic.IEnumerable of ReportParameter objects that contains a list of the report parameters properties.

The parameters specified for the M:Microsoft.Reporting.WebForms.ServerReport.SetParameters(Microsoft.Reporting.WebForms.ReportParameter[]) method must be defined in the report definition.

Legacy Code Example

private void SetReportParameters() {
   ReportParameter p = new 
      ReportParameter("ShowDescriptions", checkBox1.Checked.ToString());
   this.reportViewer1.ServerReport.SetParameters(new ReportParameter[] { p });
}

ReportViewer1.ServerReport.SetParameters(New ReportParameter() {p})

End Sub
Return to top
Show: