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.businessobjects.com/ 지원 서비스 http://korea.businessobjects.com/services/ |