See Also

PagesCollection Class  | PagesCollection Members  | Walkthrough: Adding Pages

Language

Visual Basic

C#

Show All

index
Index of the new page.
value
Page to be inserted into the collection.
See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Insert Method

Inserts the specified page into the collection at the specified index.

[Visual Basic]
Public Sub Insert( _    ByVal index As Integer, _    ByVal value As Page _ )
[C#]
public void Insert(    int index,    Page value );

Parameters

index
Index of the new page.
value
Page to be inserted into the collection.

Example

[C#] 

private void Form1_Load(object sender, System.EventArgs e) 

    rptInsertPage rpt = new rptInsertPage(); 
    rptCoverPage rpt2 = new rptCoverPage(); 
    viewer1.Document = rpt.Document; 
    rpt.Run(); 
    rpt2.Run(); 
    rpt.Document.Pages.Insert(0, rpt2.Document.Pages[0]); 
}

[Visual Basic] 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim rpt As New rptInsertPage()
    Viewer1.Document = rpt.Document rpt.Run()
    Dim rpt2 As New rptCoverPage()
    rpt2.Run()
    rpt.Document.Pages.Insert(0, rpt2.Document.Pages(0))
End Sub

See Also

PagesCollection Class  | PagesCollection Members  | Walkthrough: Adding Pages

 

 


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