FieldObject Class

Represents a Field object on a report. This class allows you to retrieve the objects representing the specific kind and type of field object and also allows you to set generic format options inherited from the ReportObject class.

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

Syntax

'Declaration
Public Class FieldObject
    Inherits ReportObject
    Implements IDisposable
public class FieldObject : ReportObject, IDisposable

Example

This example retrieves a ReportObject object by index or by name through the Item Property of the ReportObjects collection, and cast the ReportObject as a FieldObject.

'Declaration

      Private Function GetFieldObject _
         (ByVal reportObjectName As String) As FieldObject

         Dim field As FieldObject

         If TypeOf _
            (Report.ReportDefinition.ReportObjects. _
            Item(reportObjectName)) Is FieldObject Then
            field = _
               Report.ReportDefinition.ReportObjects. _
               Item(reportObjectName)
            GetFieldObject = field
         Else : GetFieldObject = Nothing
         End If
      End Function
      
      private FieldObject GetFieldObject(string reportObjectName)
      {
         FieldObject field;

         field =
            Report.ReportDefinition.ReportObjects[reportObjectName]
            as FieldObject;
         return field;
      }
      

Inheritance Hierarchy

Object
   EngineObjectBase
      ReportObject
         FieldObject

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

FieldObject Members
CrystalDecisions.CrystalReports.Engine Namespace