Section.Name Property

Gets the section name.

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

Syntax

'Declaration

Public Overrideable ReadOnly Property Name As String
public virtual string Name {get;}

Example

This example verifies that all of the sections in the report have a non-empty name.

'Declaration

      Private Function VerifySections(ByVal myReportDocument As ReportDocument) As Boolean
        Dim result As Boolean = True
        Dim i As Integer
        For i = 1 To myReportDocument.ReportDefinition.Sections.Count
          Dim mySection As Section = myReportDocument.ReportDefinition.Sections.Item(i)
          If mySection.Name Is Nothing Then
            result = False
            Exit For
          End If
        Next
        VerifySections = result
      End Function
      
      private bool VerifySections(ReportDocument reportDocument)
      {
        for (int i=0; i<reportDocument.ReportDefinition.Sections.Count; i++)
        {
          Section section = reportDocument.ReportDefinition.Sections[i];
          if (section.Name == null)
          {
            return false;
          }
        }
        return true;
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

Section Class
Section Members
CrystalDecisions.CrystalReports.Engine Namespace