共用方式為


SpecialVarFieldDefinition 類別

提供屬性以擷取報表中出淚的特殊欄位之資訊。

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

System.Object
   CrystalDecisions.CrystalReports.Engine.EngineObjectBase
      CrystalDecisions.CrystalReports.Engine.FieldDefinition
         SpecialVarFieldDefinition

[Visual Basic]

Public Class SpecialVarFieldDefinition
   Inherits FieldDefinition
   Implements IDisposable

[C#]

public class SpecialVarFieldDefinition : FieldDefinition, IDisposable

註解

透過 FieldObject 物件的 DataSource 屬性來擷取 FieldDefinition 物件,並轉換 FieldDefinition 物件為 SpecialVarFieldDefinition 物件。

範例

下列範例會傳回 SpecialVarFieldDefinition 物件。

[VJ#]

      private SpecialVarFieldDefinition getSpecialField
         (String reportObjectName) 
      {
         FieldObject field;
         SpecialVarFieldDefinition specialField = null;
      
         try
         {
            field = (FieldObject)Report.get_ReportDefinition()
               .get_ReportObjects().get_Item( reportObjectName );
            specialField = 
               (SpecialVarFieldDefinition)field.get_DataSource();
         }
         catch (Exception e)
         {
         }
         return specialField;
      }
      
[Visual Basic]

      Private Function GetSpecialField _
         (ByVal reportObjectName As String) As SpecialVarFieldDefinition
         Dim field As FieldObject
         Dim specialField As SpecialVarFieldDefinition
      
         If TypeOf _
            (Report.ReportDefinition.ReportObjects. _ 
            Item(reportObjectName)) Is FieldObject Then
            field = Report.ReportDefinition.ReportObjects. _
               Item(reportObjectName)
      
            If TypeOf (field.DataSource) _ 
               Is SpecialVarFieldDefinition Then
               specialField = field.DataSource
               GetSpecialField = specialField
            Else : GetSpecialField = Nothing
            End If
         Else : Return Nothing
         End If
      End Function
      
[C#]

      private SpecialVarFieldDefinition GetSpecialField
         (string reportObjectName) 
      {
         FieldObject field;
         SpecialVarFieldDefinition specialField;
      
         field = 
            Report.ReportDefinition.ReportObjects[reportObjectName]
            as FieldObject;
         if (field != null)
         {
            specialField = field.DataSource as 
               SpecialVarFieldDefinition;
            if(specialField != null) return specialField;
            else return null;
         }
         else return null;
      }
      

需求

命名空間 CrystalDecisions.CrystalReports.Engine

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

請參閱

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