ActiveReports Developer 7
Add Method
See Also  Example
GrapeCity.ActiveReports.Document.v7 Assembly > GrapeCity.ActiveReports.Document.Section Namespace > PagesCollection Class : Add Method

Glossary Item Box

Adds the specified Page object to the collection.

Overload List

OverloadDescription
Add(Object)Adds a Page object to the end of the PagesCollection.  
Add(Page)Adds a Page object to the end of the PagesCollection.  

Example

C#Copy Code
int i;
private void Form1_Load(object sender, System.EventArgs e)
{
    rptOne rpt1 = new rptOne();
    rpt1.Run();
    rptTwo rpt2 = new rptTwo();
    rpt2.Run();
    for(i = 0; i < rpt2.Document.Pages.Count; i++)
    {
        rpt1.Document.Pages.Add(rpt2.Document.Pages[i]);
    }
    viewer1.Document = rpt1.Document;
}
Visual BasicCopy Code
Dim i As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim rpt As New rptOne()
    rpt.Run()
    Dim rpt2 As New rptTwo()
    rpt2.Run()
    For i = 0 To rpt2.Document.Pages.Count - 1
        rpt.Document.Pages.Add(rpt2.Document.Pages(i))
    Next
    Viewer1.Document = rpt.Document
End Sub

See Also

Reference

PagesCollection Class
PagesCollection Members

How To

Insert or Add Pages