See Also

Section Class  | Section Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

Format Event

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]
Public Event Format() As EventHandler
[C#]
public event EventHandler Format();

Remarks

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.

Example

[C#] 

private void Detail_Format(object sender, System.EventArgs eArgs) 

    this.Detail.AddBookmark("Products"); 
    this.Detail.BackColor = System.Drawing.Color.Transparent; 
    this.Detail.CanGrow = true; 
    this.Detail.CanShrink = false; 
    this.Detail.Controls.Clear(); 
    this.Detail.Height = 2.0f; 
    this.Detail.Name = "Products"; 
    this.Detail.Visible = true; 
    this.Detail.SizeToFit(); 
}

[Visual Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    Me.Detail.AddBookmark("Products")
    Me.Detail.BackColor = System.Drawing.Color.Transparent
    Me.Detail.CanGrow = True
    Me.Detail.CanShrink = False
    Me.Detail.Controls.Clear()
    Me.Detail.Height = 2.0F
    Me.Detail.Name = "Products"
    Me.Detail.Visible = True
    Me.Detail.SizeToFit()
End Sub

See Also

Section Class  | Section Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.