ActiveReports3 Request technical support
Add Method
See Also  Example


Adds a new section to the collection with the specified name
Adds a section to the SectionCollection.

Overload List

OverloadDescription
Add(SectionType,String)Adds the specified SectionType to the SectionCollection.  
Add(Section)Adds the specified section to the SectionCollection.  

Example

C#Copy Code
private void button2_Click(object sender, System.EventArgs e)
{
   DataDynamics.ActiveReports3.ActiveReport rpt =
new DataDynamics.ActiveReports3.ActiveReport();
   rpt.Sections.Add(DataDynamics.ActiveReports3.SectionType.Detail,
"detail");
   rpt.Sections.InsertPageHF();
   rpt.Sections[0].BackColor = System.Drawing.Color.DarkOrchid;
   rpt.Sections[1].BackColor = System.Drawing.Color.Orchid;
   rpt.Sections[2].BackColor = System.Drawing.Color.DarkOrchid;
   rpt.Run();
   
this.arv.Document = rpt.Document;
}
Visual BasicCopy Code
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim rpt As New DataDynamics.ActiveReports3.ActiveReport
    rpt.Sections.Add(DataDynamics.ActiveReports3.SectionType.Detail, "Detail1")
    rpt.Sections.InsertPageHF()
    rpt.Sections(0).BackColor = System.Drawing.Color.DarkOrchid
    rpt.Sections(1).BackColor = System.Drawing.Color.Orchid
    rpt.Sections(2).BackColor = System.Drawing.Color.DarkOrchid
    rpt.Run()
    Me.Viewer1.Document = rpt.Document
End Sub

Remarks

When modifying the layout of a report, the Insert methods are easier to use for header/footer section pairs.

See Also