URL 存取參數參考URL Access Parameter Reference

您可以使用下列參數當做 URL 的一部分,以設定報表的外觀及操作。You can use the following parameters as part of a URL to configure the look and feel of your reports. 本章節中將列出最常用的參數。The most common parameters are listed in this section. 參數會區分大小寫,而且如果是導向至報表伺服器,則以參數前置字元 rs: 開頭,如果是導向至 HTML 檢視器,則以 rc: 開頭。Parameters are case-insensitive and begin with the parameter prefix rs: if directed to the report server and rc: if directed to an HTML Viewer. 您也可以指定裝置或轉譯延伸模組特定的參數。You can also specify parameters that are specific to devices or rendering extensions. 如需裝置特定參數的詳細資訊,請參閱 在 URL 中指定裝置資訊設定For more information about device-specific parameters, see Specify Device Information Settings in a URL.


請務必讓 URL 包含 _vti_bin Proxy 語法,以便透過 SharePoint 和 Reporting ServicesReporting Services HTTP Proxy 路由傳送要求。It is important the URL include the _vti_bin proxy syntax to route the request through SharePoint and the Reporting ServicesReporting Services HTTP proxy. 此 Proxy 會將某些內容加入至 HTTP 要求,也就是確保針對 SharePoint 模式報表伺服器正確執行報表所需的內容。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 Report Server Items Using URL Access>。For examples, see Access Report Server Items Using URL Access.

如需有關在 URL 中包含報表參數的詳細資訊與範例,請參閱< Pass a Report Parameter Within a URL>。For information about including report parameters in a URL, and examples, see Pass a Report Parameter Within a URL.

HTML 檢視器命令 (rc:)HTML Viewer Commands (rc:)

下表描述 URL 存取參數前面會加上rc: ,並用來以 HTML 檢視器為目標。The following table describes the URL access parameters that are prefixed with rc: and are used to target the HTML Viewer.

參數Parameter 描述Description Values
工具列Toolbar 顯示或隱藏工具列。Shows or hides the toolbar.

** 重要* * rc: toolbar = false不適用於 URL 存取字串使用 IP 位址,而不是網域名稱,將目標設上裝載的報表SharePoint 網站。** Important ** rc:Toolbar=false does not work for URL access strings that use an IP address, instead of a domain name, to target a report hosted on a SharePoint site.
如果這個參數的值為 false,則會忽略所有剩餘的選項。If the value of this parameter is false, all remaining options are ignored. 如果您省略這個參數,工具列就會自動顯示以轉譯支援該參數的格式。If you omit this parameter, the toolbar is automatically displayed for rendering formats that support it. 這個參數的預設值為 trueThe default of this parameter is true.

參數Parameters 顯示或隱藏工具列的參數區。Shows or hides the parameters area of the toolbar.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

如果將這個參數設定為 true,工具列的參數區就會顯示。If you set this parameter to true, the parameters area of the toolbar is displayed. 如果將這個參數設定為 false,參數區就不會顯示,且無法由使用者顯示。If you set this parameter to false, the parameters area is not displayed and cannot be displayed by the user. 如果將這個參數設定為 Collapsed 的值,參數區就不會顯示,但可以由使用者切換顯示。If you set this parameter to a value of Collapsed, the parameters area will not be displayed, but can be toggled by the end user. 此參數的預設值為 trueThe default value of this parameter is true. 有效值為:Valid values are:

顯示比例Zoom 將報表縮放值設定為整數百分比或字串常數。Sets the report zoom value as an integer percentage or a string constant.

Native 模式範例:Native mode example:

http://myrshost/reportserver?/Sales&rc:Zoom=Page Width

SharePoint 模式範例:SharePoint mode example:

http://myspsite/subsite/_vti_bin/reportserver?http://myspsite/subsite/Sales&rc:Zoom=Page Width
標準字串值包括 Page WidthWhole PageStandard string values include Page Width and Whole Page. Internet Explorer 5.0 之前的舊版 Internet Explorer 和所有非MicrosoftMicrosoft 瀏覽器都會忽略這個參數。This parameter is ignored by versions of Internet Explorer earlier than Internet Explorer 5.0 and all non-MicrosoftMicrosoft browsers. 此參數的預設值為 100The default value of this parameter is 100.
章節Section 設定要顯示報表中的哪一頁。Sets which page in the report to display.

Native 若要顯示報表的第 2 頁的模式範例:Native mode example to display page 2 of the report:


SharePoint 若要顯示報表的第 2 頁的模式範例:SharePoint mode example to display page 2 of the report:

任何大於報表中頁數的值都會顯示最後一頁。Any value that is greater than the number of pages in the report displays the last page. 任何小於 0 的值都會顯示報表的第 1 頁。Any value that is less than 0 displays page 1 of the report. 此參數的預設值為 1The default value of this parameter is 1.
FindStringFindString 在報表中搜尋特定文字集。Search a report for a specific set of text.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

StartFindStartFind 指定要搜尋的最後一部分。Specifies the last section to search.

Native 搜尋第一個出現的"Mountain-400"文字在 Product Catalog 範例報表開始第一頁,並終止於頁面 5 的模式範例:Native mode example that searches for the first occurrence of the text "Mountain-400" in the Product Catalog sample report starting with page one and ending with page five:

http://server/Reportserver?/SampleReports/Product Catalog&rs:Command=Render&rc:StartFind=1&rc:EndFind=5&rc:FindString=Mountain-400
此參數的預設值是報表的最後一頁。The default value of this parameter is the last page of the report.
EndFindEndFind 設定要在搜尋中使用的最後一頁的頁碼。Sets the number of the last page to use in the search. 例如,5 的值指出要搜尋的最後一頁為報表的第 5 頁。For example, a value of 5 indicates that the last page to be searched is page 5 of the report. 將此參數搭配 StartFind 參數使用。Use this parameter in conjunction with the StartFind parameter. 上述範例,請參閱StartFindSee the above example for StartFind . 預設值為目前頁面的頁碼。The default value is the number of the current page.
FallbackPageFallbackPage 設定在搜尋或文件引導模式選取項目失敗時所顯示頁面的頁碼。Sets the number of the page to display if a search or a document map selection fails. 預設值為目前頁面的頁碼。The default value is the number of the current page.
GetImageGetImage 取得 HTML 檢視器使用者介面的特定圖示。Gets a particular icon for the HTML Viewer user interface.
圖示Icon 取得特定轉譯延伸模組的圖示。Gets the icon of a particular rendering extension.
StylesheetStylesheet 指定要套用至 HTML 檢視器的樣式表。Specifies a style sheet to be applied to the HTML Viewer.
裝置資訊設定Device Information Setting 指定裝置資訊設定的形式rc:tag=value,其中標記的裝置資訊設定特定轉譯延伸模組目前所使用的名稱 (請參閱描述格式化參數)。Specifies a device information setting in the form of rc:tag=value, where tag is the name of a device information setting specific to the rendering extension that is currently used (see the description for the Format parameter). 例如,您可以利用 IMAGE 轉譯延伸模組的 OutputFormat 裝置資訊設定,使用下列 URL 存取字串的參數將報表轉譯為 JPEG 影像: ...&rs:Format=IMAGE&rc:OutputFormat=JPEGFor example, you can use the OutputFormat device information setting for the IMAGE rendering extension to render the report to a JPEG image using the following parameters in the URL access string: ...&rs:Format=IMAGE&rc:OutputFormat=JPEG. 如需所有延伸模組特定裝置資訊設定的詳細資訊,請參閱轉譯延伸模組的裝置資訊設定 (Reporting Services)For more information on all extension-specific device information settings, see Device Information Settings for Rendering Extensions (Reporting Services).

報表伺服器命令 (rs:)Report Server Commands (rs:)

下表描述 URL 存取參數前面會加上rs: ,並用來針對下列報表伺服器。The following table describes the URL access parameters that are prefixed with rs: and are used to target the report server.

參數Parameter 描述Description
CommandCommand 目錄項目上所執行的動作,視其項目類型而定。Performs an action on a catalog item, depending on its item type. 預設值取決於 URL 存取字串中所參考目錄項目的類型。The default value is determined by the type of the catalog item referenced in the URL access string. 有效值為:Valid values are:

ListChildrenGetChildren顯示資料夾的內容。ListChildren and GetChildren Displays the contents of a folder. 資料夾項目會顯示在一般項目導覽頁中。The folder items are displayed within a generic item-navigation page.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

Render 轉譯指定的報表。Render Renders the specified report.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

GetSharedDatasetDefinition 顯示與共用資料集相關聯的 XML 定義。GetSharedDatasetDefinition Displays the XML definition associated with a shared dataset. 共用資料集屬性 (包括查詢、資料集參數、預設值、資料集篩選,以及定序和大小寫區分等資料選項) 是儲存於定義中。Shared dataset properties, including the query, dataset parameters, default values, dataset filters, and data options such as collation and case sensitivity, are saved in the definition. 您必須對共用資料集具有 [讀取報表定義] 權限,才能使用這個值。You must have Read Report Definition permission on a shared dataset to use this value.

Native 模式範例:Native mode example:

GetDataSourceContents 顯示指定共用的資料來源的屬性為 XML。GetDataSourceContents Displays the properties of a given shared data source as XML. 如果您的瀏覽器支援 XML,而且如果您是具有資料來源之 Read Contents 權限的已驗證使用者,會顯示資料來源定義。If your browser supports XML and if you are an authenticated user with Read Contents permission on the data source, the data source definition is displayed.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

GetResourceContents 轉譯資源並將它顯示在 HTML 頁面中,如果資源與瀏覽器不相容。GetResourceContents Renders a resource and displays it in an HTML page if the resource is compatible with the browser. 否則,系統會提示您開啟檔案或資源,或是將其儲存至磁碟。Otherwise, you are prompted to open or save the file or resource to disk.

Native 模式範例:Native mode example:


SharePoint 模式範例:SharePoint mode example:

GetComponentDefinition 顯示已發行的報表項目相關聯的 XML 定義。GetComponentDefinition Displays the XML definition associated with a published report item. 您必須擁有Read Contents已發行的報表項目上的權限,才能使用這個值。You must have Read Contents permission on a published report item to use this value.
格式Format 指定用於轉譯報表的格式。Specifies the format in which to render a report. 常見的值包括 ATOMHTML4.0MHTMLIMAGEEXCELWORDCSVPDFXMLCommon values include ATOM, HTML4.0, MHTML, IMAGE, EXCEL, WORD, CSV, PDF, XML. 預設值是 HTML4.0The default value is HTML4.0. 如需詳細資訊,請參閱 Export a Report Using URL AccessFor more information, see Export a Report Using URL Access.

例如,直接從 Native 模式報表伺服器取得報表的 PDF 副本。For example to get a PDF copy of a report directly from a Native mode report server.


例如 SharePoint 模式。For example in SharePoint mode.

ParameterLanguageParameterLanguage 提供 URL 所傳遞參數的語言,這與瀏覽器語言無關。Provides a language for parameters passed in a URL that is independent of the browser language. 預設值是瀏覽器語言。The default value is the browser language. 此值可以是文化特性值,例如 en-usde-de.The value can be a culture value, such as en-us or de-de.

例如在 Native 模式下,覆寫瀏覽器語言及指定文化特性值 de-DE。For example in Native mode, to override the browser language and specify a culture value of de-DE.

快照式Snapshot 根據報表記錄快照集來轉譯報表。Renders a report based on a report history snapshot. 如需詳細資訊,請參閱 使用 URL 存取轉譯報表記錄快照集For more information, see Render a Report History Snapshot Using URL Access.

例如在 Native 模式下,擷取日期為 2003-04-07 且時間戳記為 13:40:02 的報表記錄快照集。For example in Native mode, retrieve a report history snapshot dated 2003-04-07 with a timestamp of 13:40:02.

http://myrshost/reportserver?/SampleReports/Company Sales&rs:Snapshot=2003-04-07T13:40:02
PersistStreamsPersistStreams 轉譯單一永續性資料流中的報表。Renders a report in a single persisted stream. 這個參數是由影像轉譯器用來傳輸轉譯的報表,一次一個區塊。This parameter is used by the Image renderer to transmit the rendered report one chunk at a time. 在 URL 存取字串中使用這個參數後,以 GetNextStream 參數使用相同的 URL 存取字串,而不用 PersistStreams 參數,以取得永續性資料流中的下一個區塊。After using this parameter in a URL access string, use the same URL access string with the GetNextStream parameter instead of the PersistStreams parameter to get the next chunk in the persisted stream. 這個 URL 命令最後會傳回 0 個位元組資料流,表示永續性資料流結尾。This URL command will eventually return a 0-byte stream to indicate the end of the persisted stream. 預設值是 falseThe default value is false.
GetNextStreamGetNextStream 取得使用 PersistStreams 參數存取的永續性資料流中的下一個資料區塊。Gets the next data chunk in a persisted stream that is accessed using the PersistStreams parameter. 如需詳細資訊,請參閱 PersistStreams的描述。For more information, see the description for PersistStreams. 預設值是 falseThe default value is false.
SessionIDSessionID 指定用戶端應用程式和報表伺服器之間已建立的使用中報表工作階段。Specifies an established active report session between the client application and the report server. 此參數的值是設定為工作階段識別碼。The value of this parameter is set to the session identifier.

您可以將工作階段識別碼指定為 Cookie 或是 URL 的一部分。You can specify the session ID as a cookie or as part of the URL. 當將報表伺服器設定成不使用工作階段 Cookie 時,第一個沒有指定工作階段識別碼的要求,會導致使用某個工作階段識別碼來進行重新導向。When the report server has been configured not to use session cookies, the first request without a specified session ID results in a redirection with a session ID. 如需有關報表伺服器工作階段的詳細資訊,請參閱< Identifying Execution State>。For more information about report server sessions, see Identifying Execution State.
ClearSessionClearSession true 的值會指示報表伺服器從報表工作階段移除報表。A value of true directs the report server to remove a report from the report session. 所有和已驗證的使用者相關聯的報表執行個體,都會從報表工作階段移除。All report instances associated with an authenticated user are removed from the report session. (報表執行個體的定義:使用不同報表參數值執行多次的相同一份報表)。預設值是 false(A report instance is defined as the same report run multiple times with different report parameter values.) The default value is false.
ResetSessionResetSession true 的值會指示報表伺服器透過移除與所有報表快照集的報表工作階段關聯,重設報表工作階段。A value of true directs the report server to reset the report session by removing the report session's association with all report snapshots. 預設值是 falseThe default value is false.
ShowHideToggleShowHideToggle 切換該報表區段的顯示和隱藏狀態。Toggles the show and hide state of a section of the report. 指定正整數以表示要切換的區段。Specify a positive integer to represent the section to toggle.

報表檢視器 Web 組件命令 (rv:)Report Viewer Web Part Commands (rv:)

下表描述 [SQL Server]SQL Server 保留報表參數名稱,而這些名稱在與 SharePoint 整合時,用於以報表檢視器 Web 組件為目標。The following table describes the [SQL Server]SQL Server reserved report parameter names that are used to target the Report Viewer Web Part that is integrated with SharePoint. 這些參數名稱都使用 rv: 做為字首。These parameter names are prefixed with rv:. 報表檢視器 Web 組件也接受 rs:ParameterLanguage 參數。The Report Viewer Web Part also accepts the rs:ParameterLanguage parameter.

參數Parameter 動作Action
工具列Toolbar 控制報表檢視器 Web 組件的工具列顯示。Controls the toolbar display for the Report Viewer Web Part. 預設值是 FullThe default value is Full. 其值可能是:Values can be:

Full:顯示完整的工具列。Full: display the complete toolbar.

Navigation:只在工具列中顯示分頁。Navigation: display only pagination in the toolbar.

None:不顯示工具列。None: do not display the toolbar.

例如,在 SharePoint 模式中,只在工具列中顯示分頁。For example in SharePoint mode, to display only pagination in the toolbar.

HeaderAreaHeaderArea 控制報表檢視器 Web 組件的標頭顯示。Controls the header display for the Report Viewer Web Part. 預設值是 FullThe default value is Full. 其值可能是:Values can be:

Full:顯示完整的標頭。Full: display the complete header.

BreadCrumbsOnly:只在標頭中顯示蹤跡導覽,以通知使用者他們在應用程式中的所在位置。BreadCrumbsOnly: display only the bread-crumb navigation in the header to inform the user where they are in the application.

None:不顯示標頭。None: do not display the header.

例如,在 SharePoint 模式中,只在標頭中顯示階層連結導覽。For example in SharePoint mode, to display only the bread-crumb navigation in the header.

DocMapAreaWidthDocMapAreaWidth 控制參數區在報表檢視器 Web 組件中的顯示寬度 (以像素為單位)。Controls the display width, in pixels, of the parameter area in the Report Viewer Web Part. 預設值與報表檢視器 Web 組件的預設值相同。The default value is the same as the Report Viewer Web Part default. 其值必須為非負整數。The value must be a non-negative integer.
AsyncRenderAsyncRender 控制是否要以非同步方式轉譯報表。Controls whether a report is rendered asynchronously. 預設值為 true,此值指定以非同步方式轉譯報表。The default value is true, which specifies that a report be rendered asynchronously. 此值必須為 truefalse 的布林值。The value must be a Boolean value of true or false.
ParamModeParamMode 控制報表檢視器 Web 組件的參數提示區域在整頁檢視中的顯示方式。Controls how the Report Viewer Web Part's parameter prompt area is displayed in full-page view. 預設值是 FullThe default value is Full. 有效值為:Valid values are:

Full:顯示參數提示區域。Full: display the parameter prompt area.

Collapsed:摺疊參數提示區域。Collapsed: collapse the parameter prompt area.

Hidden:隱藏參數提示區域。Hidden: hide the parameter prompt area.

例如,在 SharePoint 模式中,摺疊參數提示區域。For example in SharePoint mode, to collapse the parameter prompt area.

DocMapModeDocMapMode 控制報表檢視器 Web 組件的文件引導模式區域在整頁檢視中的顯示方式。Controls how the Report Viewer Web Part's document map area is displayed in full-page view. 預設值是 FullThe default value is Full. 有效值為:Valid values are:

Full:顯示文件引導模式區域。Full: display the document map area.

Collapsed:摺疊文件引導模式區域。Collapsed: collapse the document map area.

Hidden:隱藏文件引導模式區域。Hidden: hide the document map area.
DockToolBarDockToolBar 控制報表檢視器 Web 組件的工具列是否停駐在頂部或底部。Controls whether the Report Viewer Web Part's toolbar is docked to the top or bottom. 有效值為 TopBottomValid values are Top and Bottom. 預設值是 TopThe default value is Top.

例如,在 SharePoint 模式中,將工具列停駐在底部。For example in SharePoint mode, to dock the toolbar to the bottom.

ToolBarItemsDisplayModeToolBarItemsDisplayMode 控制要顯示的工具列項目。Controls which toolbar items are displayed. 這是位元列舉值。This is a bitwise enumeration value. 若要包含工具列項目,請將項目的值新增總值。To include a toolbar item, add the item's value to the total value. 例如:針對沒有動作功能表,請使用 rv:ToolBarItemsDisplayMode=63 (或 0x3F),這就是 1+2+4+8+16+ 32;僅針對動作功能表項目,請使用 rv:ToolBarItemsDisplayMode=960 (或 0x3C0)。For example: for no Actions menu, use rv:ToolBarItemsDisplayMode=63 (or 0x3F), which is 1+2+4+8+16+32; for Actions menu items only, use rv:ToolBarItemsDisplayMode=960 (or 0x3C0). 預設值是 -1,其中包含所有的工具列項目。The default value is -1, which includes all toolbar items. 有效值為:Valid values are:

1 (0x1):[上一步] 按鈕1 (0x1): the Back button

2 (0x2):文字搜尋控制項2 (0x2): the text search controls

4 (0x4):頁面導覽控制項4 (0x4): the page navigation controls

8 (0x8):[重新整理] 按鈕8 (0x8): the Refresh button

16 (0x10):[顯示比例] 清單方塊16 (0x10): the Zoom list box

32 (0x20):[Atom 摘要] 按鈕32 (0x20): the Atom Feed button

64 (0x40):[動作] 中的 [列印] 功能表選項64 (0x40): the Print menu option in Actions

128 (0x80):[動作] 中的 [匯出] 子功能表128 (0x80): the Export submenu in Actions

256 (0x100:[動作] 中的 [用報表產生器開啟] 功能表選項256 (0x100: the Open with Report Builder menu option in Actions

512 (0x200:[動作] 中的 [訂閱] 功能表選項512 (0x200: the Subscribe menu option in Actions

1024 (0x400:[動作] 中的 [新資料警示] 功能表選項1024 (0x400: the New Data Alert menu option in Actions

例如,在SharePoint模式中只顯示按鈕、 文字搜尋控制項、 頁面導覽控制項,而重新整理 按鈕。For example, in SharePoint mode to display only the Back button, text search controls, page navigation controls, and the Refresh button.


另請參閱See Also

URL 存取 (SSRS)URL Access (SSRS)