Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

open subreport database connection

I have some CR 8.5 reports with subreport. I used to have codes to open the subreport database connection.

Set crSecs = Report.Sections

For i = 1 To crSecs.Count

Set crSec = crSecs.Item(i)

Set crRepObjs = crSec.ReportObjects

For x = 1 To crRepObjs.Count

If crRepObjs.Item(x).Kind = crSubreportObject Then

Set crSubReport = Report.OpenSubreport(crRepObjs.Item(x).SubreportName)

'the following code sets the subreport table to a different database

crSubReport.Database.Tables(1).SetLogOnInfo DataSource, strPUser, strPass

End If



Now I am using CR 11 and the code no longer works. My subreport doesn't refresh the data according to the database I used.

Any suggestion will be greatly appreciated.


Former Member
Not what you were looking for? View more on this topic or Ask a question