Skip to Content
Aug 15, 2013 at 06:34 PM

Replace Connection on Subreports


I am using The Replace Connection code from this document ( ), but I have found it does not change the Provider for a subreport. And, if I try to use this same code for a subreport, the following exception is generated when I try to use the ReportClientDocument.DatabaseController.SetTableLocation forthe subreport:

"Not supported within subreports."

I can use the DataSourceConnections(0).SetConnection which updates ther server, database, user id, password, but I need to update the provider so it is the same as the main report.

How do you do this?