Share via


TextObject Class

Represents a text object found in a report. This object provides properties and methods for retrieving information and setting options for a text object in a report.

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

Syntax

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

Remarks

Retrieve a ReportObject object by index or by name through the Item Property of the ReportObjects collection, and cast the ReportObject as a TextObject.

Example

This example shows how to get a text object.

'Declaration

      Private Function GetTextObject _
         (ByVal reportObjectName As String) As TextObject
         Dim text As TextObject

         If TypeOf _
            (Report.ReportDefinition.ReportObjects. _
            Item(reportObjectName)) Is TextObject Then
            text = _
               Report.ReportDefinition.ReportObjects. _
               Item(reportObjectName)
            GetTextObject = text
         Else : GetTextObject = Nothing
         End If
      End Function
      
      private TextObject GetTextObject
         (string reportObjectName)
      {
         TextObject text;

         text = Report.ReportDefinition.ReportObjects[reportObjectName]
            as TextObject;
         return text;
      }
     

Inheritance Hierarchy

Object
   EngineObjectBase
      ReportObject
         TextObject

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

TextObject Members
CrystalDecisions.CrystalReports.Engine Namespace