DateFieldFormat 클래스
보고서의 날짜 필드에 대한 날짜 형식 옵션을 가져오거나 설정할 수 있습니다.
이 형식의 멤버 목록을 보려면 DateFieldFormat 멤버를 참조하십시오.
System.Object
CrystalDecisions.CrystalReports.Engine.EngineObjectBase
CrystalDecisions.CrystalReports.Engine.ReportObjectProperty
DateFieldFormat
[Visual Basic]
Public Class DateFieldFormat
Implements IDisposable
[C#]
public class DateFieldFormat : IDisposable
예제
다음 예제는 FieldFormat 개체의 DateFormat 속성을 사용하여 DateFieldFormat 개체를 검색합니다.
[VJ#]
private DateFieldFormat getDateFieldFormat
(String reportObjectName)
{
FieldObject field;
DateFieldFormat dateFormat = null;
try
{
field = (FieldObject)Report.get_ReportDefinition()
.get_ReportObjects().get_Item(reportObjectName);
if (field.get_DataSource().get_ValueType() == FieldValueType.DateField)
dateFormat = field.get_FieldFormat().get_DateFormat();
}
catch (Exception e)
{
}
return dateFormat;
}
[Visual Basic]
Private Function GetDateFieldFormat _
(ByVal reportObjectName As String) As DateFieldFormat
Dim field As FieldObject
Dim dateFormat As DateFieldFormat
If TypeOf _
(Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)) Is FieldObject Then
field = _
Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)
If field.DataSource.ValueType = _
FieldValueType.DateField Then
dateFormat = field.FieldFormat.DateFormat
GetDateFieldFormat = dateFormat
Else : GetDateFieldFormat = Nothing
End If
Else : GetDateFieldFormat = Nothing
End If
End Function
[C#]
private DateFieldFormat GetDateFieldFormat
(string reportObjectName)
{
FieldObject field;
DateFieldFormat dateFormat;
field =
Report.ReportDefinition.ReportObjects[reportObjectName]
as FieldObject;
if (field != null)
{
if (field.DataSource.ValueType == FieldValueType.DateField)
{
dateFormat = field.FieldFormat.DateFormat;
return dateFormat;
}
else return null;
}
else return null;
}
요구 사항
네임스페이스 CrystalDecisions.CrystalReports.Engine
어셈블리 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
참고 항목
DateFieldFormat 멤버 | CrystalDecisions.CrystalReports.Engine 네임스페이스
©2005 Business Objects SA All rights reserved.
Business Objects SA http://www.businessobjects.com/ 지원 서비스 http://korea.businessobjects.com/services/ |