SectionFormat Class

Allows you to get and set format options for a section.

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

Syntax

'Declaration
Public Class SectionFormat
    Inherits EngineObjectBase
    Implements IDisposable
public class SectionFormat : EngineObjectBase, IDisposable

Remarks

Retrieve the SectionFormat object through the SectionFormat Property of the Section object.

Example

This example changes the formatting properties of a report section.

'Declaration

          Private Sub InitializeSectionFormat(ByVal myReportDocument As ReportDocument)
             Dim mySectionFormat As SectionFormat

             mySectionFormat = myReportDocument.ReportDefinition.Sections.Item(1).SectionFormat
             mySectionFormat.EnableSuppress = False
             mySectionFormat.EnableNewPageBefore = False
             mySectionFormat.EnableNewPageAfter = False
             mySectionFormat.EnableKeepTogether = True
             mySectionFormat.EnableSuppressIfBlank = True
             mySectionFormat.EnableResetPageNumberAfter = False
             mySectionFormat.EnablePrintAtBottomOfPage = False
             mySectionFormat.EnableUnderlaySection = True
             mySectionFormat.BackgroundColor = Color.Red
          End Sub
          
          private void InitializeSectionFormat(ReportDocument reportDocument)
          {
             SectionFormat sectionFormat = reportDocument.ReportDefinition.Sections[1].SectionFormat;
             sectionFormat.EnableSuppress = false;
             sectionFormat.EnableNewPageBefore = false;
             sectionFormat.EnableNewPageAfter = false;
             sectionFormat.EnableKeepTogether = true;
             sectionFormat.EnableSuppressIfBlank = true;
             sectionFormat.EnableResetPageNumberAfter = false;
             sectionFormat.EnablePrintAtBottomOfPage = false;
             sectionFormat.EnableUnderlaySection = true;
             sectionFormat.BackgroundColor = Color.Red;
          }
          

Inheritance Hierarchy

Object
   EngineObjectBase
      SectionFormat

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

SectionFormat Members
CrystalDecisions.CrystalReports.Engine Namespace