Border Class

Allows you to get and set border options for report objects in a report.

Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

Syntax

'Declaration
Public Class Border
    Inherits ReportObjectProperty
    Implements IDisposable
public class Border : ReportObjectProperty, IDisposable

Remarks

Retrieve the Border object through the Border property of the ReportObject object.

Example

This example shows how to set the border line styles to a single style, update the background and border colors, and change the drop shadow setting.

'Declaration

  Private Sub UpdateBlobFieldObjectBorder(ByVal myReportDocument As ReportDocument, ByVal reportObjectName As String, ByVal myLineStyle As LineStyle, ByVal backgroundColor As Color, ByVal borderColor As Color)
      Dim myReportObject As ReportObject = myReportDocument.ReportDefinition.ReportObjects.Item(reportObjectName)
      If myReportObject.Kind = ReportObjectKind.BlobFieldObject Then
          Dim myBlobFieldObject As BlobFieldObject = myReportObject
          Dim myBorder As Border = myBlobFieldObject.Border
          myBorder.BackgroundColor = backgroundColor
          myBorder.BorderColor = borderColor
          myBorder.BottomLineStyle = myLineStyle
          myBorder.LeftLineStyle = myLineStyle
          myBorder.RightLineStyle = myLineStyle
          myBorder.TopLineStyle = myLineStyle
          myBorder.HasDropShadow = True
      End If
  End Sub
            
  private void UpdateBlobFieldObjectBorder(ReportDocument reportDocument, String reportObjectName, LineStyle lineStyle, Color backgroundColor, Color borderColor)
  {
      ReportObject reportObject = reportDocument.ReportDefinition.ReportObjects[reportObjectName];
      if (reportObject.Kind == ReportObjectKind.BlobFieldObject)
      {
          BlobFieldObject blobFieldObject = (BlobFieldObject)reportObject;
          Border border = blobFieldObject.Border;

          border.BackgroundColor = backgroundColor;
          border.BorderColor = borderColor;
          border.BottomLineStyle = lineStyle;
          border.LeftLineStyle = lineStyle;
          border.RightLineStyle = lineStyle;
          border.TopLineStyle = lineStyle;
          border.HasDropShadow = false;
      }
  }
            

Inheritance Hierarchy

Object
   EngineObjectBase
      ReportObjectProperty
         Border

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

Border Members
CrystalDecisions.CrystalReports.Engine Namespace