Metodo LocalReport.SetParameters (IEnumerable<ReportParameter>)
Imposta le proprietà dei parametri di report per il report locale.
Spazio dei nomi: Microsoft.Reporting.WebForms
Assembly: Microsoft.ReportViewer.WebForms (in Microsoft.ReportViewer.WebForms.dll)
Sintassi
'Dichiarazione
Public Overrides Sub SetParameters ( _
parameters As IEnumerable(Of ReportParameter) _
)
public override void SetParameters(
IEnumerable<ReportParameter> parameters
)
public:
virtual void SetParameters(
IEnumerable<ReportParameter^>^ parameters
) override
abstract SetParameters :
parameters:IEnumerable<ReportParameter> -> unit
override SetParameters :
parameters:IEnumerable<ReportParameter> -> unit
public override function SetParameters(
parameters : IEnumerable<ReportParameter>
)
Parametri
- parameters
Tipo: IEnumerable<ReportParameter>
Raccolta IEnumerable di oggetti ReportParameter contenente l'elenco delle proprietà dei parametri del report.
Note
The parameters specified for the SetParameters method must be defined in the original report definition.
Esempi
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