You can do it the same way as you do it for the report, except that in the case of the subreport, you have to first get the handle to the subreport from the report object. Then write the same code with SubReport instead of Report object.
Dim SRObj As SubreportObject = Report.ReportDefinition.ReportObjects.Item("SR1"
Dim SR1 As New ReportDocument()
SR1 = SRObj.OpenSubreport("Sub Report Name"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.