Class Section
The sections are contained inside subreports, depending on the section type it will print after the detail (group header), before the detail (group header), or in special places (page headers and footers)
Implements
Inherited Members
Namespace: Reportman.Reporting
Assembly: Reportman.Reporting.dll
Syntax
public class Section : PrintItem, IDisposable
Constructors
Section()
Initialization of the section
Declaration
public Section()
Fields
AlignBottom
If this property is true, the section will be aligned to the bottom of the page, and of course next section will be printed in the next page, the alignment is done after resizing (so it's compatible with Auto expand and Auto contract properties)
Declaration
public bool AlignBottom
Field Value
| Type | Description |
|---|---|
| bool |
AutoContract
The section will contract vertically to avoid unused space. This is useful when you want to print some variable text and you don't know how much page space you need, of if some of the components are printed under certain conditions and you want to profit space
Declaration
public bool AutoContract
Field Value
| Type | Description |
|---|---|
| bool |
AutoExpand
The section will expand vertically to keep space for any component inside it. This is useful when you want to print some variable text and you don't know how much page space you need
Declaration
public bool AutoExpand
Field Value
| Type | Description |
|---|---|
| bool |
BackExpression
The backgorund image can be embedded (Stream propery) or obtained throught this expression property, the expression is evaluated, if the expression result is a binary database field will try to read the image from there, see below the image formats supported. If the field is a string field or the result of evaluation is a string the engine will try to load the image as a file reference.
Declaration
public string BackExpression
Field Value
| Type | Description |
|---|---|
| string |
BackStyle
The background of the section can be used for multiple purposes, one is help in design time to fill a form for example, but no preview or print (preprinted forms). You can also select to draw the background image in preview or print the image on the paper also.
Declaration
public BackStyleType BackStyle
Field Value
| Type | Description |
|---|---|
| BackStyleType |
BeginPage
This expression is evaluated before printing, if result is true the group will begin a page
Declaration
public bool BeginPage
Field Value
| Type | Description |
|---|---|
| bool |
BeginPageExpression
This expression is evaluated before printing, if result is true the group will begin a page
Declaration
public string BeginPageExpression
Field Value
| Type | Description |
|---|---|
| string |
ChangeBool
If true, the engine breaks the group when the Group Expression is true, else will break the group when the group expression result changes
Declaration
public bool ChangeBool
Field Value
| Type | Description |
|---|---|
| bool |
ChangeExpression
This expression is evaluated for each record of the Main dataset for the subreport, it will determine a group break with the Bool Expression property
Declaration
public string ChangeExpression
Field Value
| Type | Description |
|---|---|
| string |
ChildSubReport
If a child subreport is assigned it will be processed and printed after printing this section
Declaration
[JsonIgnore]
[JsonIgnore]
public SubReport ChildSubReport
Field Value
| Type | Description |
|---|---|
| SubReport |
ChildSubReportName
Child subreport name, it stores the reference to the other subreport
Declaration
public string ChildSubReportName
Field Value
| Type | Description |
|---|---|
| string |
DrawStyle
Image draw style, for background image
Declaration
public ImageDrawStyleType DrawStyle
Field Value
| Type | Description |
|---|---|
| ImageDrawStyleType |
ExternalConnection
Will load the section from a database so the reports can share sections.
Declaration
public string ExternalConnection
Field Value
| Type | Description |
|---|---|
| string |
ExternalField
Will load the section from a database so the reports can share sections.
Declaration
public string ExternalField
Field Value
| Type | Description |
|---|---|
| string |
ExternalFilename
Will load the section from a file so the report file can share sections. The external path canIf a child subreport is assigned it will be processed and printed after printing this section be an expression by preceding the string by the @ symbol.
Declaration
public string ExternalFilename
Field Value
| Type | Description |
|---|---|
| string |
ExternalSearchField
Will load the section from a database so the reports can share sections.
Declaration
public string ExternalSearchField
Field Value
| Type | Description |
|---|---|
| string |
ExternalSearchValue
Will load the section from a database so the reports can share sections.
Declaration
public string ExternalSearchValue
Field Value
| Type | Description |
|---|---|
| string |
ExternalTable
Will load the section from a database so the reports can share sections.
Declaration
public string ExternalTable
Field Value
| Type | Description |
|---|---|
| string |
FirstPage
While processing the report, it contains the first page where the group began
Declaration
public int FirstPage
Field Value
| Type | Description |
|---|---|
| int |
ForcePrint
For page footers, means the page footer must print at the end of the subreport if no data is still available. For group headers means the header will print also when footer is pending if page repeat is true
Declaration
public bool ForcePrint
Field Value
| Type | Description |
|---|---|
| bool |
Global
For page header and footers only, if this property is true, the header/footer will be processed globally just like if it was outside the subreport
Declaration
public bool Global
Field Value
| Type | Description |
|---|---|
| bool |
GroupName
For sections with type Group, is the group name
Declaration
public string GroupName
Field Value
| Type | Description |
|---|---|
| string |
GroupValue
Latest group value while report processing is in progress
Declaration
public Variant GroupValue
Field Value
| Type | Description |
|---|---|
| Variant |
HorzDesp
When horizzontal desplacement is set to true, after printing the section the print position will move to the left, in an amount equivalent to the section width. But this will happen only when the next section to print has also the horizontal desplacement set to true, else the horizontal print position will be restored. Set this property to true in the detail section for example to print labels left to right, adjust the section with so many details fit in the total page width.
Declaration
public bool HorzDesp
Field Value
| Type | Description |
|---|---|
| bool |
IniNumPage
Available only for groups, initialize the variable PageNum to 1 when the group changes
Declaration
public bool IniNumPage
Field Value
| Type | Description |
|---|---|
| bool |
PageRepeat
If true, the group header will print in each page where the group is still active.
Declaration
public bool PageRepeat
Field Value
| Type | Description |
|---|---|
| bool |
SectionType
Type of section inside the subreport (page header,group header, detail)
Declaration
public SectionType SectionType
Field Value
| Type | Description |
|---|---|
| SectionType |
SharedImage
Determines how the image is shared in the report to enhace final metafile or pdf size
Declaration
public SharedImageType SharedImage
Field Value
| Type | Description |
|---|---|
| SharedImageType |
SkipExpreH
Determines the horizontal position, the result of the expression must be an integer, the unit is in twips (1440twips=1 inch), the skip may be relative or absolute depending on property bellow
Declaration
public string SkipExpreH
Field Value
| Type | Description |
|---|---|
| string |
SkipExpreV
Determines the verticalposition, the result of the expression must be an integer, the unit is in twips (1440twips=1 inch), the skip may be relative or absolute depending on property bellow
Declaration
public string SkipExpreV
Field Value
| Type | Description |
|---|---|
| string |
SkipPage
If this property is true, after printing the section a new page will begin (unless there is nothing more to print)
Declaration
public bool SkipPage
Field Value
| Type | Description |
|---|---|
| bool |
SkipRelativeH
If true the skip is relative to the print pointer else is relative to the current page
Declaration
public bool SkipRelativeH
Field Value
| Type | Description |
|---|---|
| bool |
SkipRelativeV
If true the skip is relative to the print pointer else is relative to the current page
Declaration
public bool SkipRelativeV
Field Value
| Type | Description |
|---|---|
| bool |
SkipToPageExpre
If a skip type is assigned then this expression is used to determine the page to relocate the print pointer
Declaration
public string SkipToPageExpre
Field Value
| Type | Description |
|---|---|
| string |
SkipType
The skip is a repositioning of the print pointer, you can place print pointer to another page and/or page position with properties bellow
Declaration
public SkipType SkipType
Field Value
| Type | Description |
|---|---|
| SkipType |
StreamFormat
Stream format while saving the image, by default, it matches the parent subreport stream format
Declaration
public StreamFormatType StreamFormat
Field Value
| Type | Description |
|---|---|
| StreamFormatType |
SubReport
Parent subreport of the section
Declaration
[JsonIgnore]
[JsonIgnore]
public SubReport SubReport
Field Value
| Type | Description |
|---|---|
| SubReport |
SubReportName
Parent subreport name, it stores the reference to the parent subreport
Declaration
public string SubReportName
Field Value
| Type | Description |
|---|---|
| string |
SyncWidth
At designtime sincrhonize width with other sections with syncWidth true
Declaration
public bool SyncWidth
Field Value
| Type | Description |
|---|---|
| bool |
VertDesp
When vertical desplacement is set to true, the print is performed as usually (up to down), after reaching the bottom of the page, the print position will place at the top of the page (or group header) , and the left print position will move an amount equivalent to the section with (if fits in the page), then printing continue. But this will happen only when the next section to print has also the vertical desplacement set to true, else the engine will skip to next page. Set this property to true in the detail section for example to print labels up to down, adjust the section with so many details fit in the total page width.
Declaration
public bool VertDesp
Field Value
| Type | Description |
|---|---|
| bool |
dpires
Resolution of the image in pixels per inch unit, the size of the bitmap and the resolution will determine the final size
Declaration
public int dpires
Field Value
| Type | Description |
|---|---|
| int |
Properties
Components
List of child components, this components are labels, expressions, images...
Declaration
public List<PrintPosItem> Components { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PrintPosItem> |
IsExternal
Returns true if the section is an external section
Declaration
[Browsable(false)]
public bool IsExternal { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Stream
Embedded image, stored with the report structure containing a image stream, will be drawn bellow the grid, using the resolution bellow. When embedding large images you should set prefered save format in page setup to xml/gzip to enhace performance.
Declaration
[Browsable(false)]
[JsonIgnore]
[JsonIgnore]
public MemoryStream Stream { get; }
Property Value
| Type | Description |
|---|---|
| MemoryStream |
StreamBase64
Declaration
public string StreamBase64 { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ClearPageCountList()
While processing the report, clears the page count items cache
Declaration
public void ClearPageCountList()
Dispose()
Free resources used by the section
Declaration
public override void Dispose()
Overrides
DoPrint(PrintOut, int, int, int, int, MetaFile, Point, ref bool)
Prints the full section in a specific position of the page, the section will iterate the child components, printing each one
Declaration
protected override void DoPrint(PrintOut adriver, int aposx, int aposy, int newwidth, int newheight, MetaFile metafile, Point MaxExtent, ref bool PartialPrint)
Parameters
| Type | Name | Description |
|---|---|---|
| PrintOut | adriver | |
| int | aposx | |
| int | aposy | |
| int | newwidth | |
| int | newheight | |
| MetaFile | metafile | |
| Point | MaxExtent | |
| bool | PartialPrint |
Overrides
EvaluateBeginPage()
Evaluates the begin page expression, if true, the section must be the first page in the page, excluding page headers,group repeats
Declaration
public bool EvaluateBeginPage()
Returns
| Type | Description |
|---|---|
| bool |
GetClassName()
Internal function to determine the object type name
Declaration
protected override string GetClassName()
Returns
| Type | Description |
|---|---|
| string | Object type name |
Overrides
GetDisplayName(bool)
Declaration
public string GetDisplayName(bool addchildsubreport)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | addchildsubreport |
Returns
| Type | Description |
|---|---|
| string |
GetExtension(PrintOut, Point, bool)
Used by report processing to determine the size of the section, depending on the output driver the size may vary
Declaration
public override Point GetExtension(PrintOut adriver, Point MaxExtent, bool ForcePartial)
Parameters
| Type | Name | Description |
|---|---|---|
| PrintOut | adriver | |
| Point | MaxExtent | |
| bool | ForcePartial |
Returns
| Type | Description |
|---|---|
| Point |
Overrides
GetExternalDataDescription()
Declaration
public string GetExternalDataDescription()
Returns
| Type | Description |
|---|---|
| string |
GetStream()
While processing the report, this is a helper to get the background image stream. It processes the background expression if necessary
Declaration
public MemoryStream GetStream()
Returns
| Type | Description |
|---|---|
| MemoryStream |
SubReportChanged(SubReportEvent, string)
The report notifies the section when a report starts or moves, so the section can update internal values
Declaration
public override void SubReportChanged(SubReportEvent newstate, string newgroup)
Parameters
| Type | Name | Description |
|---|---|---|
| SubReportEvent | newstate | |
| string | newgroup |
Overrides
UpdatePageCounts()
While processing the report, update all page count references with the updated page count value, used by PAGEGROUPCOUNT special expression feature.
Declaration
public void UpdatePageCounts()