GetPermissions Method
Collapse the table of content
Expand the table of content

GetPermissions Method

SQL Server 2000

ReportingService.GetPermissions Method

Returns the user permissions that are associated with a particular item in the report server database.

Public Function GetPermissions( _
   ByVal Item As String _
) As String
   Member of [Namespace].ReportingService

public string GetPermissions(
   string Item
   Member of [Namespace].ReportingService
The full path name of the item.
Return Value

An array of String[] objects that contains a list of permissions that are associated with the assigned tasks and roles of the item for the current user.


To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples. The following code example uses the GetPermissions method to retrieve the permissions associated with the Company Sales report:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials
         Dim permissions As [String]() = rs.GetPermissions("/SampleReports/Company Sales")
         Dim perm As String
         For Each perm In  permissions
         Next perm
      Catch e As SoapException
      End Try
   End Sub 'Main
End Class 'Sample

using System;
using System.Web.Services.Protocols;

class Sample
   public static void Main()
      ReportingService rs = new ReportingService();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

         String[] permissions = rs.GetPermissions( "/SampleReports/Company Sales" );

         foreach ( string perm in permissions )
            Console.WriteLine( perm );

      catch ( SoapException e )
         Console.WriteLine( e.Detail.InnerXml.ToString() );

The console output for this method might look like the following example:

Execute and View
Read Properties
Update Properties
Update Parameters
Read Data Sources
Update Data Sources
Read Report Definition
Update Report Definition
Create Subscription
Delete Subscription
Read Subscription
Delete Report History
Update Subscription
Create Any Subscription
Delete Any Subscription
Read Any Subscription
Read Security Policies
Update Security Policies
Update Any Subscription
Read Policy
Update Policy
List Report History
Create Report History
Create Link
See Also

ReportingService Class

Reporting Services Web Service Library

© 2015 Microsoft