The event handler receives an argument of type CreateAreaEventArgs containing data related to this event.
The following
CreateAreaEventArgs properties provide information specific to this event.
Property |
Description |
Graph |
Gets a BrickGraphics object used to draw in the current report. |
Handle the CreateDetailHeaderArea event to customize the detail header section of a document.
The document creation events occur in the following order:
Note
This order may be different in descendants of the LinkBase class.
For more information on handling events, see Events and Delegates in MSDN.

Example
The following example demonstrates how to write a CreateDetailHeaderArea event handler.

C# |
void link1_CreateDetailHeaderArea(object sender, CreateAreaEventArgs e) {
string s = "I am the Detail Header Area";
e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center, StringAlignment.Center);
e.Graph.Font = new Font("Comic Sans MS", 10);
e.Graph.BackColor = Color.LightGreen;
e.Graph.ForeColor = Color.Green;
SizeF sz = e.Graph.MeasureString(s);
sz.Width += 2;
RectangleF r = new RectangleF(new PointF(0,0),sz);
e.Graph.DrawString(s, r);
}
|
VB |
Private Sub link1_CreateDetailHeaderArea(ByVal sender As Object, ByVal e As CreateAreaEventArgs)
Handles link1.CreateDetailHeaderArea
Dim s As String = "I am the Detail Header Area"
e.Graph.StringFormat = New BrickStringFormat(StringAlignment.Center, StringAlignment.Center)
e.Graph.Font = New Font("Comic Sans MS", 10)
e.Graph.BackColor = Color.LightGreen
e.Graph.ForeColor = Color.Green
Dim sz As SizeF = e.Graph.MeasureString(s)
sz.Width += 2
Dim r As RectangleF = New RectangleF(New PointF(0,0),sz)
e.Graph.DrawString(s, r)
End Sub
|