I am using ASP.net Reportviewer to display SSRS reports on my website.
I would like to know the number of Datasources a report has.
I am currently using:
int noOfReports = ReportViewer.ServerReport.GetDataSources().Count()
This only returns the number of DataSources that require a prompt.
How do I get a complete list of a report's DataSources?
Edit:
The reason we wish to count the DataSources is we are only allowing our report developers to have datasources that the system can change the data source credientials at runtime.
So if there is a method returns: "This report is using datasources, that uses intergrated security or stored credientials" This would work for us as well.
AFAIK the ReportViewer ServerReport has no method to retrieve all data sources used in the report. A different approach would be to use the GetItemDataSources(string itemPath)
method in the web service API.