Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS: Get list of all reports and parameters in a single web service call?

Short and sweet version: Is there a single web service method that would return the names of all available reports, and each report's parameters?

I have my web code (C#/MVC) connected to a SSRS web service, and I am able to retrieve reports through those services.

I know I can get a list of available reports like this:

var rService = new ReportingService2005
{
 Url = @"http://domain.com/ReportServer/ReportService2005.asmx?wsdl",
 Credentials = System.Net.CredentialCache.DefaultCredentials
};

var reportList = rService.ListChildren(@"/Blah", true);

The result of ListChildren() gives a lot of information, but it doesn't list the parameters for each report. In order to get the parameter for a report, I need to make a separate call:

string historyId = null;
ReportService.ParameterValue[] values = null;
ReportService.DataSourceCredentials[] credentials = null;

var parameters = rService.GetReportParameters(@"/Blah/" + reportName, historyId, true, values, credentials);

So if I want to get all available reports and their parameters, I would need to loop through the results of ListChildren, which means I would be making a web service call for each of those reports.

Is there a better way of doing this?

like image 679
Jason La Avatar asked Jul 02 '10 20:07

Jason La


1 Answers

There is not such a call bulitin to the webservices interface. As an alternative, you could achieve something similar by directly querying the reporting services systems tables in the ReportServer DB; but this is going to be version dependant, and MS probably will not support it.

That being said I have used these tables to create several adhoc reports in the past. and did not experience any problems YMMV.

like image 84
Jason Horner Avatar answered Nov 16 '22 05:11

Jason Horner