Document Object Model

The classes’ hierarchy is considered in this article. These classes are used for final reports and during templates creation.

The PerpetuumSoft.Framework.Atom is a base class for all SharpShooter Reports classes. This class is a descendant from System.Object. This class realizes the Sustem.IClonable interface.

The Atom class is a parent of ReportComponent – a base class for all SharpShooter Reports components. ReportComponent and all the classes and interfaces given below are located in the PerpetuumSoft.Reporting.DOM namespace. This class has the Name property which sets an object name.

Two classes are inherited from ReportComponent. They are Document and ReportControl. Document is used for representation of a report template and final document. It includes the Pages collection of the document pages.

ReportControl is a base class for all template elements or final document. Two classes are inherited from ReportControl. They are ContainerControl and VisualControl. ContainerControl is a base class for all non-visual report elements which, in their turn, can contain ReportControl descendants. The VisualControl class is a base class for all visual report elements.

The ContainerControl class

This class implements the IContainerControl interface in which the Controls property is included. This property is a collection of objects nested into this object. The IContainerControl interface includes the IsValidChild method which gets the ReportControl type parameter and sets true if the passed object can be placed into it. Below is given the hierarchy of ContainerControl classes’ descendants.

Page and Section.Page are direct descendants of ContainerControl. Page and Section.Page are pages in a template or final report.

The Section object is a basic object for all bands. CrossBand and BandBase are inherited from it. PageBand and RegularBand are descendants of BandBase. PageBand is a base class for PageHeader, PageFooter and PageOverlay sections which are output on each page. RegularBand is a base class for all other sections. It includes a collection of aggregates (the Aggregates property) and has the MasterBand property of the DataBand type. Thus, its descendants can be placed into the DataBand, including DataBand itself. This allows the creation of Master – Subreport reports with any nested levels.

DetailBase is inherited from RegularBand. This class is a base class for all sections in which visual control elements can be placed. This class has the Render method which outputs the band content into report. Header and Footer are inherited directly from DetailBase. Header and Footer are headlines for the DataBand. The Detail is inherited from DetailBase. This section is output for each record from a data source and GroupBand. 

The VisualControl class

The Shape class is inherited from the VisualControl class. Shape allows the output of various shapes into a report.

The Box class is also inherited from the VisualControl class. This class is a base class for control elements which are located in the rectangle area. It has Border, Fill and Margin properties for setting borders of an area. BarCode, Picture, RichText, WinFormsControl, ZipCode are inherited from the Box class.

The TextControl class is inherited from the Box class. TextControl is a base class for output of text data into a report. It has the Angle property which allows the setting of the rotation angle for text, CanGrow and CanShrink properties which allow the change of height of an object depending on the output text automatically, the Font property which sets the font, the TextAlign property which sets text alignment, the TextFill property which sets the text fill and the TextFormat property which sets the text format. TextBox is inherited from TextControl. The TextBox class has the FindText method which can be used for searching text information.

Add Feedback