BoxObject 類別

代表報表中所繪製的方塊。

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

System.Object
   CrystalDecisions.CrystalReports.Engine.EngineObjectBase
      CrystalDecisions.CrystalReports.Engine.ReportObject
         CrystalDecisions.CrystalReports.Engine.DrawingObject
            BoxObject

[Visual Basic]

Public Class BoxObject
   Inherits DrawingObject
   Implements IDisposable

[C#]

public class BoxObject : DrawingObject, IDisposable

註解

這個類別可以讓您擷取資訊,並設定繼承自 DrawingObject 類別的泛用格式選項。

範例

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

[VJ#]

      static private BoxObject getBoxObject(String reportObjectName)
      {
         BoxObject box = null;
      
         try
         {
            box =
               (BoxObject)Report.get_ReportDefinition().get_ReportObjects()
               .get_Item(reportObjectName);
         }
         catch (Exception e)
         {
         }
         return box;
      }
      
[Visual Basic]

      Private Function GetBoxObject _
         (ByVal reportObjectName As String) As BoxObject
      
         Dim box As BoxObject
      
         If TypeOf _
            (Report.ReportDefinition.ReportObjects. _
            Item(reportObjectName)) Is BoxObject Then
            box = _
               Report.ReportDefinition.ReportObjects. _
               Item(reportObjectName)
            GetBoxObject = box
         Else : GetBoxObject = Nothing
         End If
      End Function
      
[C#]

      private BoxObject GetBoxObject(string reportObjectName)
      {
         BoxObject box;
         
         box =
            section.ReportObjects[reportObjectName] as BoxObject;
         return box;
      }
      

需求

命名空間 CrystalDecisions.CrystalReports.Engine

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

請參閱

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