BooleanFieldFormat 类

使您可以获取和设置布尔值字段的布尔值输出类型。

有关该类型所有成员的列表,参见 BooleanFieldFormat 成员。

System.Object
   CrystalDecisions.CrystalReports.Engine.EngineObjectBase
      CrystalDecisions.CrystalReports.Engine.ReportObjectProperty
         BooleanFieldFormat

[Visual Basic]

Public Class BooleanFieldFormat
Implements IDisposable

[C#]

public class BooleanFieldFormat : IDisposable

备注

通过 FieldFormat 对象的 BooleanFormat 属性,检索 BooleanFieldFormat 对象。

示例

以下示例返回 BooleanFieldFormat 对象。

  
[VJ#]
      private BooleanFieldFormat getBooleanFieldformat
         (String reportObjectName)
      {
         FieldObject field;
         BooleanFieldFormat booleanFormat = null;
         try
         {
            field =
               (FieldObject)Report.get_ReportDefinition()
               .get_ReportObjects().get_Item(reportObjectName);
            if (field.get_DataSource().get_ValueType() ==
               FieldValueType.BooleanField)
               booleanFormat = field.get_FieldFormat().get_BooleanFormat();
         }
         catch (Exception e)
         {
         }
         return booleanFormat;
      }
      
  
[Visual Basic]
      Function GetBooleanFieldformat _
         (ByVal reportObjectName As String) As BooleanFieldFormat
      
         Dim field As FieldObject
         Dim booleanFormat As BooleanFieldFormat
      
         If TypeOf _
            (Report.ReportDefinition.ReportObjects. _
            Item(reportObjectName)) Is FieldObject Then
            field = _
               Report.ReportDefinition.ReportObjects. _
               Item(reportObjectName)
            If field.DataSource.ValueType = _
               FieldValueType.BooleanField Then
               booleanFormat = field.FieldFormat.BooleanFormat
               GetBooleanFieldformat = booleanFormat
            Else : GetBooleanFieldformat = Nothing
            End If
         Else : GetBooleanFieldformat = Nothing
         End If
      End Function
      
  
[C#]
      private BooleanFieldFormat GetBooleanFieldformat
         (string reportObjectName)
      {
         FieldObject field;
         BooleanFieldFormat booleanFormat;
         field =
            Report.ReportDefinition.ReportObjects[reportObjectName]
            as FieldObject;
         if (field != null)
         {
            if (field.DataSource.ValueType ==
               FieldValueType.BooleanField)
            {
               booleanFormat = field.FieldFormat.BooleanFormat;
               return booleanFormat;
            }
            else return null;
         }
         else return null;
      }
      

要求

命名空间 CrystalDecisions.CrystalReports.Engine

程序集 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

请参见

BooleanFieldFormat 成员 | CrystalDecisions.CrystalReports.Engine 命名空间

**

©2005 Business Objects SA 保留所有权利。

Business Objects SA
http://www.china.businessobjects.com/
支持服务
http://www.china.businessobjects.com/