Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 IEnumerable 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 p1 = new
ReportParameter("ShowDescriptions", checkBox1.Checked.ToString());
ReportParameter p2 = new
ReportParameter("ShowTitle", checkBox2.Checked.ToString());
this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1, p2 });
}
Private Sub SetReportParameters()
Dim p1 As New ReportParameter("ShowDescriptions", _
CheckBox1.Checked.ToString())
Dim p2 As New ReportParameter("ShowTitle", _
CheckBox2.Checked.ToString())
ReportViewer1.LocalReport.SetParameters(New ReportParameter() {p1, p2})
End Sub
See Also
Reference
LocalReport Class
LocalReport Members
Microsoft.Reporting.WebForms Namespace