共用方式為


使用 URL 存取報表伺服器項目

本主題描述如何使用 rs:Command=Value 存取在報表伺服器資料庫或 SharePoint 網站中不同類型的目錄項目。

不需要新增此參數位符串。 如果您省略它,報表伺服器會評估專案類型,並自動選取適當的參數值。 不過,在 URL 中使用 rs:Command=Value 字串可改善報表伺服器的效能。

_vti_bin請注意下列範例中的 Proxy 語法。 如需使用 Proxy 語法的詳細資訊,請參閱 URL 存取參數參考

存取報表

若要在瀏覽器中檢視報表,請使用 rs:Command=Render 參數。 例如:

Native http://myrshost/reportserver?/Sales/YearlySalesByCategory&rs:Command=Render

SharePoint http://myspsite/subsite/_vti_bin/reportserver?http://myspsite/subsite/Sales/YearlySalesByCategory&rs:Command=Render

小提示

URL 中必須包含 _vti_bin Proxy 語法,以便透過 SharePoint 和 Reporting Services HTTP Proxy 進行要求的路由。 Proxy 會將某些內容新增至 HTTP 要求,這是確保 SharePoint 模式報表伺服器正確執行報表所需的內容。

存取資源

若要存取資源,請使用 rs:Command=GetResourceContents 參數。如果資源與瀏覽器相容,例如影像,則會在瀏覽器中開啟。 否則,系統會提示您開啟檔案或資源,或是將其儲存至磁碟。

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

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

存取數據源

若要存取數據源,請使用 rs:Command=GetDataSourceContents 參數。 如果您的瀏覽器支援 XML,如果您是具有 Read Contents 數據源許可權的已驗證使用者,就會顯示數據源定義。 例如:

Native http://myrshost/reportserver?/Sales/AdventureWorks2012&rs:Command=GetDataSourceContents

SharePoint http://myspsite/subsite/_vti_bin/reportserver?http://myspsite/subsite/Sales/AdventureWorks2012&rs:Command=GetDataSourceContents

XML 結構看起來可能類似下列範例:

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

連接字串會根據報表伺服器的 SecureConnectionLevel 設定傳回。 如需 SecureConnectionLevel 設定的詳細資訊,請參閱 使用安全 Web 服務方法

存取資料夾的內容

若要存取資料夾的內容,請使用 rs:Command=GetChildren 參數。 傳回泛型資料夾導覽頁面,其中包含所要求資料夾中子資料夾、報表、數據源和資源的連結。 例如:

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

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

您看到的使用者介面類似於Microsoft Internet Information Server (IIS) 所使用的目錄流覽模式。 報表伺服器的版本號碼,包括組建編號,也會顯示在資料夾清單下方。

另請參閱

URL 存取(SSRS)
URL 存取參數參考