ReportDefinition.Areas Property

Gets the Areas collection.

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

Syntax

'Declaration

Public Overrideable ReadOnly Property Areas As CrystalDecisions.CrystalReports.Engine.Areas
public virtual CrystalDecisions.CrystalReports.Engine.Areas Areas {get;}

Example

This example shows how to suppress all ReportHeader areas in a ReportDocument.

'Declaration

  Private Sub SuppressReportHeaderArea(ByVal myReportDocument As ReportDocument)
    Dim myReportDefinition As ReportDefinition
    myReportDefinition = myReportDocument.ReportDefinition()

    Dim myAreas As Areas
    myAreas = myReportDefinition.Areas()

    Dim myArea As Area
    For Each myArea In myAreas
      If myArea.Kind = AreaSectionKind.ReportHeader Then
        Dim myAreaFormat As AreaFormat
        myAreaFormat = myArea.AreaFormat()
        myAreaFormat.EnableSuppress = True
      End If
    Next
  End Sub
  private void SuppressReportHeaderArea(ReportDocument reportDocument)
  {
    ReportDefinition reportDefinition = reportDocument.ReportDefinition;

    Areas areas = reportDefinition.Areas;

    for (int i=0; i<areas.Count; i++)
    {
      Area area = areas[i];
      if (area.Kind == AreaSectionKind.ReportHeader)
      {
        AreaFormat areaFormat = area.AreaFormat;
        areaFormat.EnableSuppress = true;
      }
    }
  }

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ReportDefinition Class
ReportDefinition Members
CrystalDecisions.CrystalReports.Engine Namespace