I'm trying to enumerate, in c#, the reports for a user on reporting services.
How do I do this? Is there a web services call I should use, or should I just get the html returned from http://localhost/ReportServer/lists.asmx and pull that apart?
The second option sounds like a bit of a hack. Surely theres a better way?
This log is on by default and can be found in: C:\Program Files\Microsoft SQL Server\MSRSXX. SQL2012\Reporting Services\LogFiles or some variation depending on your SQL Server installation. The file name starts with "ReportServerService_ "and then is suffixed with the date and time and ".
To export a report from the Reporting Services web portalSelect the format that you want to use. Click Export. A dialog appears asking you if you want to open or save the file.
SSRS has a full SOAP API, you can see info on that here: http://technet.microsoft.com/en-us/library/ms155376.aspx
From the above article:
// Create a Web service proxy object and set credentials
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Return a list of catalog items in the report server database
CatalogItem[] items = rs.ListChildren("/", true);
// For each report, display the path of the report in a Listbox
foreach(CatalogItem ci in items)
{
if (ci.Type == ItemTypeEnum.Report)
catalogListBox.Items.Add(ci.Path);
}
There's a full tutorial there too: http://technet.microsoft.com/en-us/library/ms169926.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With