Adds the specified Page object to the collection.
[Visual Basic]
Public Function Add( _
ByVal value As Page _
) As Integer
Parameters
- value
- Page object to be added to the collection.
Return Type
Index of the newly added page.
Example
[C#]
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 Basic]
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
PagesCollection Class
| PagesCollection Members
| Walkthrough: Merging Reports
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.