CommonFieldFormat Class
Allows you to set format options common to all fields in a report.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Class CommonFieldFormat
Inherits ReportObjectProperty
Implements IDisposable
public class CommonFieldFormat : ReportObjectProperty, IDisposable
Example
This example retrieves the CommonFieldFormat object through the CommonFormat property of the FieldFormat object.
'Declaration
Private Function GetCommonFieldFormat _
(ByVal reportObjectName As String) As CommonFieldFormat
Dim field As FieldObject
Dim commonFormat As CommonFieldFormat
If TypeOf _
(Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)) Is FieldObject Then
field = _
Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)
commonFormat = field.FieldFormat.CommonFormat
GetCommonFieldFormat = commonFormat
Else : GetCommonFieldFormat = Nothing
End If
End Function
private CommonFieldFormat GetCommonFieldFormat
(string reportObjectName)
{
FieldObject field;
CommonFieldFormat commonFormat;
field =
Report.ReportDefinition.ReportObjects[reportObjectName]
as FieldObject;
if (field != null)
{
commonFormat = field.FieldFormat.CommonFormat;
return commonFormat;
}
else return null;
}
Inheritance Hierarchy
Object
EngineObjectBase
ReportObjectProperty
CommonFieldFormat
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
CommonFieldFormat Members
CrystalDecisions.CrystalReports.Engine Namespace