Page 1 of 1

How to add pages from one report to another

Posted: Fri May 22, 2009 9:41 am
by mdavidson
I need to add pages from one report to another, And I tried the code

Dim mReport As New StiReport
mReport.Load("Reports0.mrt")

Dim oReport As New StiReport
oReport.Load("Reports1.mrt")

For Each aPage As StiPage In oReport.Pages
mReport.Pages.Add(aPage)
Next
mReport.show

This causes an error
System.NullReferenceException
{"Object reference not set to an instance of an object."}

Is there a way to copy a page from one report to another?

How to add pages from one report to another

Posted: Sun May 24, 2009 11:02 am
by Jan
Hello,

You need fill Report property with new report. For example:

Code: Select all

aPage.Report = mReport

Thank you.