共用方式為


FieldHeadingObject 類別

代表報表中出現的欄位標題物件。這個物件提供屬性與方法,以擷取資訊並設定報表中欄位標題物件的選項。

如需這個類型的成員清單,請參閱 FieldHeadingObject 成員。

System.Object
   CrystalDecisions.CrystalReports.Engine.EngineObjectBase
      CrystalDecisions.CrystalReports.Engine.ReportObject
         CrystalDecisions.CrystalReports.Engine.TextObject
            FieldHeadingObject

[Visual Basic]

Public Class FieldHeadingObject
   Inherits TextObject
   Implements IDisposable

[C#]

public class FieldHeadingObject : TextObject, IDisposable

範例

下列範例會透過 ReportObjects 集合的 Item 屬性依索引或名稱來擷取 ReportObject 物件,並轉換 ReportObject 為 FieldHeadingObject。

[VJ#]

      private FieldHeadingObject getFieldHeadingObject(String fieldHeadingName) 
      {
         FieldHeadingObject fieldHeading = null;
      
         try
         {
            fieldHeading = (FieldHeadingObject)Report.get_ReportDefinition()
               .get_ReportObjects().get_Item(fieldHeadingName);
         }
         catch (Exception e)
         {
         }
         return fieldHeading;
      }
      
[Visual Basic]

      Private Function GetFieldHeadingObject _
         (ByVal fieldHeadingName As String) As FieldHeadingObject
      
         Dim fieldHeading As FieldHeadingObject
      
         If TypeOf _
         (Report.ReportDefinition.ReportObjects. _
            Item(fieldHeadingName)) Is TextObject Then
            fieldHeading = _
               Report.ReportDefinition.ReportObjects. _
               Item(fieldHeadingName)
            GetFieldHeadingObject = fieldHeading
         Else : GetFieldHeadingObject = Nothing
         End If
      End Function
      
[C#]

      private FieldHeadingObject GetFieldHeadingObject(string fieldHeadingName) 
      {
         FieldHeadingObject fieldHeading;
      
         fieldHeading = Report.ReportDefinition.ReportObjects[fieldHeadingName] as FieldHeadingObject;
         return fieldHeading;
      }
      

需求

命名空間 CrystalDecisions.CrystalReports.Engine

組件 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

請參閱

FieldHeadingObject 成員 | 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/