BlobFieldObject Class
Represents a blob field object on the report. This class allows you to retrieve the objects representing the specific kind of field object and also allows you to set generic format options inherited from the ReportObject class.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Class BlobFieldObject
Inherits ReportObject
Implements IDisposable
public class BlobFieldObject : ReportObject, IDisposable
Remarks
Retrieve a ReportObject object by index or by name through the Item property of the ReportObjects collection, and cast the ReportObject as a BlobFieldObject.
Example
This example shows how to get the BlobFieldObject and update the properties of a blob field that determine an object's position and formatting.
'Declaration
Private Function GetBlobField(ByVal reportObjectName As String) _
As BlobFieldObject
Dim blobField As BlobFieldObject
If TypeOf _
(Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)) Is BlobFieldObject Then
blobField = _
Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)
GetBlobField = blobField
Else : GetBlobField = Nothing
End If
End Function
Private Sub UpdateBlobFieldObjectProperties(ByVal myReportDocument As ReportDocument, ByVal reportObjectName As String, ByVal top As Integer, ByVal left As Integer, ByVal height As Integer, ByVal width As Integer)
Dim myReportObject As ReportObject = myReportDocument.ReportDefinition.ReportObjects.Item(reportObjectName)
If myReportObject.Kind = ReportObjectKind.BlobFieldObject Then
Dim myBlobFieldObject As BlobFieldObject = myReportObject
myBlobFieldObject.Top = top
myBlobFieldObject.Left = left
myBlobFieldObject.Height = height
myBlobFieldObject.Width = width
Dim myObjectFormat As ObjectFormat = myBlobFieldObject.ObjectFormat
myObjectFormat.EnableCanGrow = False
myObjectFormat.EnableSuppress = False
myObjectFormat.EnableCloseAtPageBreak = True
myObjectFormat.EnableKeepTogether = True
End If
End Sub
private BlobFieldObject GetBlobField(string reportObjectName)
{
BlobFieldObject blobField = null;
blobField =
Report.ReportDefinition.ReportObjects[reportObjectName]
as BlobFieldObject;
return blobField;
}
private void UpdateBlobFieldObjectProperties(ReportDocument reportDocument, String reportObjectName, int top, int left, int height, int width)
{
ReportObject reportObject = reportDocument.ReportDefinition.ReportObjects[reportObjectName];
if (reportObject.Kind == ReportObjectKind.BlobFieldObject)
{
BlobFieldObject blobFieldObject = (BlobFieldObject)reportObject;
blobFieldObject.Top = top;
blobFieldObject.Left = left;
blobFieldObject.Height = height;
blobFieldObject.Width = width;
ObjectFormat objectFormat = blobFieldObject.ObjectFormat;
objectFormat.EnableCanGrow = false;
objectFormat.EnableSuppress = false;
objectFormat.EnableCloseAtPageBreak = true;
objectFormat.EnableKeepTogether = true;
}
}
Inheritance Hierarchy
Object
EngineObjectBase
ReportObject
BlobFieldObject
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
BlobFieldObject Members
CrystalDecisions.CrystalReports.Engine Namespace