TextObject 類別
代表報表中出淚的文字物件。這個物件提供屬性與方法,以擷取資訊並設定報表中文字物件的選項。
如需這個類型的成員清單,請參閱 TextObject 成員。
System.Object
CrystalDecisions.CrystalReports.Engine.EngineObjectBase
CrystalDecisions.CrystalReports.Engine.ReportObject
TextObject
[Visual Basic]
Public Class TextObject
Inherits ReportObject
Implements IDisposable
[C#]
public class TextObject : ReportObject, IDisposable
註解
透過 ReportObjects 集合的 Item 屬性依索引或名稱來擷取 ReportObject 物件,並轉換 ReportObject 為 TextObject。
範例
下列範例會傳回 TextObject 物件。
[VJ#]
private TextObject getTextObject
(String reportObjectName)
{
TextObject text = null;
try
{
text = (TextObject)Report.get_ReportDefinition()
.get_ReportObjects().get_Item(reportObjectName);
}
catch (Exception e)
{
}
return text;
}
[Visual Basic]
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
[C#]
private TextObject GetTextObject
(string reportObjectName)
{
TextObject text;
text = Report.ReportDefinition.ReportObjects[reportObjectName]
as TextObject;
return text;
}
需求
命名空間 CrystalDecisions.CrystalReports.Engine
組件 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
請參閱
TextObject 成員 | CrystalDecisions.CrystalReports.Engine 命名空間
©2005 Business Objects SA All rights reserved
Business Objects SA http://www.china.businessobjects.com/ 支援的服務 http://www.china.businessobjects.com/BOindex/support/ |