I've got a couple of different user accounts set up in SQL Server Reporting Services 2005, and I'd like to programatically check (via their web services) which reports a given user has access to. How to I do that?
+2
A:
You can use the ReportingService2005 web service's ListChildren web method. It will return a list of CatalogItems that the current user can access. Then remove items that aren't Reports.
List<CatalogItem> result = new List<CatalogItem>();
result.AddRange(ListChildren(SOME_PATH_BLAH_BLAH_BLAH, true));
result.RemoveAll(delegate(CatalogItem item)
{
return item.Type != ItemTypeEnum.Report;
});
From http://technet.microsoft.com/en-us/library/reportservice2005.reportingservice2005.listchildren.aspx -
The ListChildren method returns only child items that the user has permission to view. The items that are returned may not represent a complete list of child items of the specified parent item.
Joseph Anderson
2009-04-24 21:41:24