Bewerken

Delen via


Access report server items by using URL access

This topic describes how to access catalog items of different types in a report server database or in a SharePoint site using rs:Command=Value. It is not necessary to actually add this parameter string. If you omit it, the report server evaluates the item type and selects the appropriate parameter value automatically. However, using the rs:Command=Value string in the URL improves the performance of the report server.

Note the _vti_bin proxy syntax in the examples below. For more information about using the proxy syntax, see URL access parameter reference.

Note

Reporting Services integration with SharePoint is no longer available after SQL Server 2016.

Access a report

To view a report in the browser, use the rs:Command=Render parameter. For example:

  • Native https://myrshost/reportserver?/Sales/YearlySalesByCategory&rs:Command=Render
  • SharePoint https://myspsite/subsite/_vti_bin/reportserver?https://myspsite/subsite/Sales/YearlySalesByCategory&rs:Command=Render

Tip

It is important the URL include the _vti_bin proxy syntax to route the request through SharePoint and the Reporting Services HTTP proxy. The proxy adds some context to the HTTP request, context that is required to ensure proper execution of the report for SharePoint mode report servers.

Access a resource

To access a resource, use the rs:Command=GetResourceContents parameter. If the resource is compatible with the browser, such as an image, it is opened in the browser. Otherwise, you are prompted to open or save the file or resource to disk.

Native https://myrshost/reportserver?/Sales/StorePicture&rs:Command=GetResourceContents

SharePoint https://myspsite/subsite/_vti_bin/reportserver?https://myspsite/subsite/Sales/StorePicture.jpg&rs:Command=GetResourceContents

Access a data source

To access a data source, use the rs:Command=GetDataSourceContents parameter. If your browser supports XML, the data source definition is displayed if you are an authenticated user with Read Contents permission on the data source. For example:

Native https://myrshost/reportserver?/Sales/AdventureWorks2022&rs:Command=GetDataSourceContents

SharePoint https://myspsite/subsite/_vti_bin/reportserver?https://myspsite/subsite/Sales/AdventureWorks2022&rs:Command=GetDataSourceContents

The XML structure might look similar to the following example:

<DataSourceDefinition>  
   <Extension>SQL</Extension>  
   <ConnectString>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2022;Data Source=MYSERVER1;</ConnectString>  
   <CredentialRetrieval>Integrated</CredentialRetrieval>  
   <WindowsCredentials>False</WindowsCredentials>  
   <ImpersonateUser>False</ImpersonateUser>  
   <Prompt />  
   <Enabled>True</Enabled>  
</DataSourceDefinition>  

The connection string is returned based on the SecureConnectionLevel setting of the report server. For more information about the SecureConnectionLevel setting, see Use secure web service methods.

Access the contents of a folder

To access the contents of a folder, use the rs:Command=GetChildren parameter. A generic folder-navigation page is returned that contains links to the subfolders, reports, data sources, and resources in the requested folder. For example:

Native https://myrshost/reportserver?/Sales&rs:Command=GetChildren

SharePoint https://myspsite/subsite/_vti_bin/reportserver?https://myspsite/subsite/Sales&rs:Command=GetChildren

The user interface you see is similar to the directory browsing mode used by Microsoft Internet Information Server (IIS). The version number, including the build number, of the report server is also displayed below the folder listing.