Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetParameters Method (Generic IEnumerable)
Collapse the table of content
Expand the table of content

ServerReport.SetParameters Method (Generic IEnumerable)

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
)
public void SetParameters (
	IEnumerable<ReportParameter> parameters
)
public override function SetParameters (
	parameters : IEnumerable<ReportParameter>
)

Parameters

parameters

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

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

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
Show:
© 2015 Microsoft