Partilhar via


Método ServerReport.SetParameters (IEnumerable<ReportParameter>)

Sets report parameter properties for the report.

Namespace:  Microsoft.Reporting.WebForms
Assembly:  Microsoft.ReportViewer.WebForms (em Microsoft.ReportViewer.WebForms.dll)

Sintaxe

'Declaração
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>
)

Parâmetros

Comentários

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

Exemplos

private void SetReportParameters() {
   ReportParameter p = new 
      ReportParameter("ShowDescriptions", checkBox1.Checked.ToString());
   this.reportViewer1.ServerReport.SetParameters(new ReportParameter[] { p });
}
Private Sub SetReportParameters()
   Dim p As New ReportParameter("ShowDescriptions", CheckBox1.Checked.ToString())

ReportViewer1.ServerReport.SetParameters(New ReportParameter() {p})

End Sub

Consulte também

Referência

ServerReport Classe

Sobrecargas SetParameters

Namespace Microsoft.Reporting.WebForms