Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 API for administering security

Author  Topic 

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-06-01 : 08:15:19
I am asking for a friend:

Is it possible to administer security for reports & report folders programatically ?


rockmoose

jhermiz

3564 Posts

Posted - 2005-06-01 : 09:07:25
quote:
Originally posted by rockmoose

I am asking for a friend:

Is it possible to administer security for reports & report folders programatically ?


rockmoose



O suddenly you have friends ?
But of course you can, tell your friend to head on over to:

http://yourMachineNameHere/reportserver/reportservice.asmx

You will see an XML file which shows you every possible function or property and the attributes associated with each type. What this basically means is you can use a web service to access report properties including security, jobs, identifiers, even in depth details of a specific report.

What you will need to simply do is add the web service (reportservice.asmx) to your project as a web service. For your convenience here is a list of web services from MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_8cxl.asp

Then all you do is write code calling this web service..here is an example in C# for you that snatches the names of all your reports on your server:


private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
this.objRS.Credentials = System.Net.CredentialCache.DefaultCredentials;
RSWebServiceXS.RSWebService.CatalogItem[] items = this.objRS.ListChildren("/", false);
for (int cnt=0; cnt<items.Length; cnt++)
this.cmbReports.Items.Add (items[cnt].Name.ToString());
}
}


If you need more help post back.

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-06-01 : 11:40:30
Thank You Jon, very helpful!

>> O suddenly you have friends ?
Well, it might be a matter of definition, friend, acquaintance, colleague, drinking partner

rockmoose
Go to Top of Page
   

- Advertisement -