How to programatically add an existing report to a report (as sub)

  • Thread starter Thread starter Elijah
  • Start date Start date
E

Elijah

I have a report that I want to add as a sub report

In my main report's "On Open" event I want to do something like this:

Private Sub Report_Open(Cancel As Integer)

Dim I as Integer
For i = 0 to X

'Insert my subreport (which already exists)
'Add a page break.

Next

End Sub

I've looked at CreateReportControl and CreateReport respectively- but
I am not wanting to programatically create the entire report, I just
want to add X copies of the same report (and pass them a single
Integer value as the DB parameter EG "i")

Is this possible?
 
Back
Top