ParameterFields.Item Property (String,String)

Gets the object with the specified parameter name and report name. In C#, this property is the indexer for the ParameterField class.

Namespace CrystalDecisions.Shared Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Syntax

'Declaration

Public ReadOnly Property Item ( _
    ByVal subreportName As String, _    
    ByVal index As String _ 
) As CrystalDecisions.Shared.ParameterField
public CrystalDecisions.Shared.ParameterField this [
    string subreportName,
    string index
]{get;}

Parameters

  • subreportName
  • index

Property Value

The value in the collection with the specified name.

Remarks

This property allows you to access a specific item in the collection. The item is referenced by the parameter name, such as "parameter1", and the report name, such as "report1".

The property name Item does not exist for C#. To access an item in a collection using C#, use the syntax: collection["parameter1","report1"].

Example

This example shows how to get the parameter field with the specified field name and report name.

'Declaration

    Private Function GetParameterFieldByReportAndFieldName(ByVal myParameterFields As ParameterFields, _
        ByVal myFieldName As String, ByVal myReportName As String) As ParameterField
      GetParameterFieldByReportAndFieldName = myParameterFields.Item(myFieldName, myReportName)
    End Function
    private ParameterField GetParameterFieldByReportAndFieldName(ParameterFields parameterFields, String fieldName, String reportName)
    {
      return parameterFields[fieldName, reportName];
    } 

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ParameterFields Class
ParameterFields Members
CrystalDecisions.Shared Namespace