LocalReport.SetParameters Method
Sets report parameter properties for the local 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 LocalReport
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 parameter properties.
Remarks
The parameters specified for the SetParameters method must be defined in the original report definition.
Example
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
See Also
Reference
LocalReport Class
LocalReport Members
Microsoft.Reporting.WebForms Namespace