Get list of reports from SSRS?

2020-08-10 08:05发布

问题:

I've just started working with SSRS and so far I've been able to show reports in my Winforms app using the ReportViewer, by hard-coding the report path. I would like get a list of reports from SSRS so I can display them and let the user select which one they want to see.

Is there a way to request the list of reports from SSRS? Thanks.

回答1:

Yes, absolutely - Report Services has two well established web service interfaces.

Check out this page here: Report Server Web Service and the links off it for more info, or see the Reporting Services Developer's Guide for some background and conceptual info.

Here's the definition of the ReportingService2005 class in all its details, specifically there's a ListChildren web call which enumerates all items in a given report folder. That will return all reports (and possibly data sources)

Hope that helps a bit!



回答2:

use ReportServer go

select Path, Name from catalog where type not in (1,5) order by path, Name