ActiveReports Developer 7
Format Event
See Also  Example
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.SectionReportModel Namespace > Section Class : Format Event

Glossary Item Box

Occurs after the section's data is loaded and bound to the section's controls, but before the section is rendered to the canvas.


Visual Basic (Declaration) 
Public Event Format As System.EventHandler
public event System.EventHandler Format


The format event is the only event where the section's height may be changed.  This event may be used to set or change the properties of any controls, or load subreport controls with subreports.

If the CanGrow or CanShrink property of any child control or the section itself is set to True, all of the growing and shrinking of child controls and the section itself takes place in this event.  Because of this, information about a control or section's height would not be accurate since ActiveReports might modify the value immediately after the event to account for any layout or data changes.


C#Copy Code
private void detail_Format(object sender, System.EventArgs eArgs)
    this.detail.BackColor = System.Drawing.Color.Transparent;
    this.detail.CanGrow = true;
    this.detail.CanShrink = false;
    this.detail.Height = 2.0f;
    this.detail.Name = "Products";
    this.detail.Visible = true;
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
    Me.Detail1.BackColor = System.Drawing.Color.Transparent
    Me.Detail1.CanGrow = True
    Me.Detail1.CanShrink = False
    Me.Detail1.Height = 2.0F
    Me.Detail1.Name = "Products"
    Me.Detail1.Visible = True
End Sub

See Also