共用方式為


PictureObject 類別

代表報表中的圖片物件。

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

System.Object
   CrystalDecisions.CrystalReports.Engine.EngineObjectBase
      CrystalDecisions.CrystalReports.Engine.ReportObject
         PictureObject

[Visual Basic]

Public Class PictureObject
   Inherits GraphicObject
   Implements IDisposable

[C#]

public class PictureObject : GraphicObject, IDisposable

註解

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

範例

透過 ReportObjects 集合的 Item 屬性依索引或名稱來擷取 ReportObject 物件,並轉換 ReportObject 為 PictureObject。

[VJ#]

      static private PictureObject getPictureObject
         (String reportObjectName)
      {
         PictureObject picture = null;
      
         try
         {
            picture = (PictureObject)Report.get_ReportDefinition()
               .get_ReportObjects().get_Item(reportObjectName);
         }
         catch (Exception e)
         {
            return NULL;
         }
         return picture;
      }
      
[Visual Basic]

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

      private PictureObject GetPictureObject
         (string reportObjectName)
      {
         PictureObject picture;
      
         picture =
            Report.ReportDefinition.ReportObjects[reportObjectName]
            as PictureObject;
         return picture;
      }
      

需求

命名空間 CrystalDecisions.CrystalReports.Engine

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

請參閱

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