This documentation is archived and is not being maintained.

LocalReport.SetParameters Method

Sets report parameter properties for the local report.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

public override void SetParameters (
	IEnumerable<ReportParameter> parameters
public void SetParameters (
	IEnumerable<ReportParameter> parameters
public override function SetParameters (
	parameters : IEnumerable<ReportParameter>



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 });