ActiveReports 8
InsertNew Method
See Also  Example
GrapeCity.ActiveReports.Document.v8 Assembly > GrapeCity.ActiveReports.Document.Section Namespace > PagesCollection Class : InsertNew Method

index
Index of the new page.

Glossary Item Box

Creates a new Page object and inserts it into the collection at the specified index.

Syntax

Visual Basic (Declaration) 
Public Function InsertNew( _
   ByVal index As System.Integer _
) As Page
C# 
public Page InsertNew( 
   System.int index
)

Parameters

index
Index of the new page.

Example

C#Copy Code
Private void Form1_Load(object sender, System.EventArgs e)
{
    rptInsertPage rpt = New rptInsertPage();
    viewer1.Document = rpt.Document;
    rpt.Run();
    rpt.Document.Pages.InsertNew(3);
}
Visual BasicCopy Code
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()
    rpt.Document.Pages.InsertNew(3)
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PagesCollection Class
PagesCollection Members

How To

Insert or Add Pages