You can use the ReportingService2005 API to get the data source used by a particular report.
You need the full report path (which I assume you have), and then use it to query the reporting service for your data source ( API ).
The ds in the above code is either a DataSourceDefinition or a DataSourceReference . If this is a definition, you can simply enter it into this type and then get the connection string using the following code.
DataSourceDefinition dsd = ds as DataSourceDefinition(); if(dsd == null) throw new Exception(); String connectionString = dsd.ConnectString;
If this is a quality definition, you need to check the API .
source share