Share via


SQLExpressionFieldDefinitions.Item Property (String)

Gets the object with the specified name. In C#, this property is the indexer for the SQLExpressionFieldDefinition class.

Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

Syntax

'Declaration

Public Overrideable ReadOnly Property Item ( _
    ByVal fieldName As String _ 
) As CrystalDecisions.CrystalReports.Engine.SQLExpressionFieldDefinition
public virtual CrystalDecisions.CrystalReports.Engine.SQLExpressionFieldDefinition this [
    string fieldName
]{get;}

Parameters

  • fieldName

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 object name, such as "object1".

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

Example

This example gets the SQL expression field definition according to the FieldName property.

'Declaration

      Private Function GetSQLExpressionFieldDefinitionByName(ByVal myReportDocument As ReportDocument, ByVal fieldName As String) As SQLExpressionFieldDefinition
        Dim mySQLExpressionFieldDefinitions As SQLExpressionFieldDefinitions = myReportDocument.DataDefinition.SQLExpressionFields
        GetSQLExpressionFieldDefinitionByName = mySQLExpressionFieldDefinitions.Item(fieldName)
      End Function
      
      private SQLExpressionFieldDefinition GetSQLExpressionFieldDefinitionByName(ReportDocument reportDocument, String fieldName)
      {
        SQLExpressionFieldDefinitions sqlExpressionFieldDefinitions = reportDocument.DataDefinition.SQLExpressionFields;
        return sqlExpressionFieldDefinitions[fieldName];
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

SQLExpressionFieldDefinitions Class
SQLExpressionFieldDefinitions Members
CrystalDecisions.CrystalReports.Engine Namespace