Partager via


CrystalReportViewerBase.ParameterFieldInfo Propriété

Obtient ou définit l'objet de la collection des champs de paramètre.

Espace de noms CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntaxe

Public Property ParameterFieldInfo As CrystalDecisions.Shared.ParameterFields
public CrystalDecisions.Shared.ParameterFields ParameterFieldInfo {get; set;}

Exemple

Cet exemple illustre la création d'un objet ParameterFieldInfo pour la classe CrystalReportViewerBase.

    Private Sub SetParameterFieldInfo(ByVal myFieldName As String, ByVal myFieldValue As String)
      Dim myParameterDiscreteValue As ParameterDiscreteValue = New ParameterDiscreteValue
      myParameterDiscreteValue.Value = myFieldValue
      Dim myParameterValues As ParameterValues = New ParameterValues
      myParameterValues.Add(myParameterDiscreteValue)
      Dim myParameterField As ParameterField = New ParameterField
      myParameterField.Name = myFieldName
      myParameterField.CurrentValues = myParameterValues
      Dim myPrameterFields As ParameterFields = New ParameterFields
      myPrameterFields.Add(myParameterField)
      CrystalReportViewerBase.ParameterFieldInfo = myPrameterFields
    End Sub
    private void SetParameterFieldInfo(String fieldName, String fieldValue)
    {
      ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
      parameterDiscreteValue.Value = fieldValue;
      ParameterValues currentParameterValues = new ParameterValues();
      currentParameterValues.Add(parameterDiscreteValue);
      ParameterField parameterField = new ParameterField();
      parameterField.Name = fieldName;
      parameterField.CurrentValues = currentParameterValues;
      ParameterFields parameterFields = new ParameterFields();
      parameterFields.Add(parameterField);
      crystalReportViewerBase.ParameterFieldInfo = parameterFields;
    }

Informations de version

Crystal Reports Basic for Visual Studio 2008

Pris en charge depuis : Crystal Reports for Visual Studio .NET 2002

Voir aussi

Référence

CrystalReportViewerBase Classe
CrystalReportViewerBase Membres
CrystalDecisions.Web Espace de noms