Adds a new section to the collection with the specified name
Parameters
- type
- SectionType of the new section.
- name
- Name of the new section, must be unique within the report.
Return Type
A reference to the newly added Section.
Remarks
When modifying the layout of a report, the Insert methods are easier to use for header/footer section pairs.
Example
[C#]
private void button2_Click(object sender, System.EventArgs e) { DataDynamics.ActiveReports.ActiveReport rpt = new DataDynamics.ActiveReports.ActiveReport(); rpt.Sections.Add(DataDynamics.ActiveReports.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 Basic]
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim rpt As New DataDynamics.ActiveReports.ActiveReport
rpt.Sections.Add(DataDynamics.ActiveReports.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()
Me.Viewer1.Document = rpt.Document
End Sub |
See Also
SectionCollection Class
| SectionCollection Members
| SectionType Enumeration
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.