URL 存取參數參考URL Access Parameter Reference

您可以使用下列參數當做 URL 的一部分,以設定 SQL Server 2016 Reporting Services 或更新版本 (SSRS)SQL Server 2016 Reporting Services or later (SSRS)報表的外觀及操作。You can use the following parameters as part of a URL to configure the look and feel of your SQL Server 2016 Reporting Services 或更新版本 (SSRS)SQL Server 2016 Reporting Services or later (SSRS)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.


如需使用 SharePoint 模式報表伺服器,請務必讓 URL 包含 _vti_bin Proxy 語法,以便透過 SharePoint 和 Reporting ServicesReporting Services HTTP Proxy 路由傳送要求。For a SharePoint mode report server 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 context to the HTTP request 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.

本主題內容In this topic

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

  • HTML 檢視器命令的使用對象是 HTML 檢視器,其前置詞為 rc:HTML Viewer commands are used to target the HTML Viewer, and are prefixed with rc::

  • ToolbarToolbar :
    顯示或隱藏工具列。Shows or hides the toolbar. 如果這個參數的值為 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.


    rc:Toolbar=false 不適用於不使用網域名稱,而使用 IP 位址指出 SharePoint 網站上所裝載之報表的 URL 存取字串。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.

  • Parameters:顯示或隱藏工具列的參數區。Parameters : Shows or hides the parameters area of the toolbar. 如果將這個參數設定為 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.

    例如在 Native 模式下:For an example in Native mode:


    例如在 SharePoint 模式下:For an example in SharePoint mode:

  • Zoom:將報表縮放值設定為整數百分比或字串常數。Zoom : Sets the report zoom value as an integer percentage or a string constant. 標準字串值包括 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.

    例如 Native 模式:For example in Native mode:

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

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

    https://myspsite/subsite/_vti_bin/reportserver?https://myspsite/subsite/Sales&rc:Zoom=Page Width  
  • Section:設定要顯示報表中的哪一頁。Section : Sets which page in the report to display. 任何大於報表中頁數的值都會顯示最後一頁。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.

    例如在 Native 模式下,顯示報表的第 2 頁:For example in Native mode, to display page 2 of the report:


    例如在 SharePoint 模式下,顯示報表的第 2 頁:For example in SharePoint mode, to display page 2 of the report:

  • FindString:在報表中搜尋特定文字集。FindString: Search a report for a specific set of text.

    例如 Native 模式。For an example in Native mode.


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

  • StartFind:指定要搜尋的最後一部分。StartFind : Specifies the last section to search. 此參數的預設值是報表的最後一頁。The default value of this parameter is the last page of the report.

    例如在 原生 模式下,在 Product Catalog 範例報表中搜尋第一個出現的 "Mountain-400" 文字 (搜尋開始於頁面 1,終止於頁面 5)。For an example in Native mode 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.

    https://server/Reportserver?/SampleReports/Product Catalog&rs:Command=Render&rc:StartFind=1&rc:EndFind=5&rc:FindString=Mountain-400  
  • EndFind:設定要在搜尋中使用的最後一頁的頁碼。EndFind : 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. 預設值為目前頁面的頁碼。The default value is the number of the current page. 將此參數搭配 StartFind 參數使用。Use this parameter in conjunction with the StartFind parameter. 請參閱上述範例。See the above example.

  • FallbackPage:設定在搜尋或文件引導模式選取項目失敗時所顯示頁面的頁碼。FallbackPage : 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.

  • GetImage:取得 HTML 檢視器使用者介面的特定圖示。GetImage : Gets a particular icon for the HTML Viewer user interface.

  • Icon:取得特定轉譯延伸模組的圖示。Icon : Gets the icon of a particular rendering extension.

  • Stylesheet:指定要套用至 HTML 檢視器的樣式表。Stylesheet: Specifies a style sheet to be applied to the HTML Viewer.

  • 裝置資訊設定:將裝置資訊設定指定為 rc:tag=value 的形式,其中 tag 是目前所使用轉譯延伸模組的特定裝置資訊設定名稱 (請參閱 Format 參數的描述)。Device Information Setting: 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:)

報表伺服器命令前面會加上 rs: ,而且用來針對下列報表伺服器︰Report server commands are prefixed with rs: and are used to target the report server:

  • 命令Command:
    目錄項目上所執行的動作,視其項目類型而定。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 模式。For example in Native mode.


      例如, Native 模式中的具名執行個體。For example, a named instance in Native mode.


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

    • Render 在瀏覽器中轉譯報表,以供您檢視。Render The report is rendered in the browser so you can view it.

      例如 Native 模式:For example in Native mode:


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

    • 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 模式。For example in Native mode.

    • 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 模式。For example in Native mode.


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

    • 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 模式。For example in Native mode.


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

    • GetComponentDefinition :顯示與已發行報表項目相關聯的 XML 定義。GetComponentDefinition Displays the XML definition associated with a published report item. 您必須在已發行報表項目上具有 「讀取內容」 權限,才能使用這個值。You must have Read Contents permission on a published report item to use this value.

  • FormatFormat :
    指定用於轉譯並檢視報表的格式。Specifies the format in which to render and view a report. 常見的值包括:Common values include:

    • HTML5HTML5



    • HTML4.0HTML4.0



    • EXCEL (適用於 .xls)EXCEL (for .xls)

    • EXCELOPENXML (適用於 .xlsx)EXCELOPENXML (for .xlsx)

    • WORD (適用於 .doc)WORD (for .doc)

    • WORDOPENXML (適用於 .docx)WORDOPENXML (for .docx)

    • CSVCSV

    • PDFPDF

    • XMLXML

    預設值是 HTML5秒。The default value is HTML5. 如需詳細資訊,請參閱 Export a Report Using URL AccessFor more information, see Export a Report Using URL Access.

    如需完整清單,請參閱報表伺服器 rsreportserver.config 檔案的 <轉譯> 延伸模組區段。For a complete list, see the <Render> extension section of the report server rsreportserver.config file. 如需如何尋找檔案的資訊,請參閱 RsReportServer.config Configuration FileFor information on where to find the file, see RsReportServer.config Configuration File.

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


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

  • 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-deThe value can be a culture value, such as en-us or de-de.

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

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

    例如在 原生 模式下,擷取日期為 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:

    https://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 ServerSQL Server 保留報表參數名稱,而這些名稱用於將報表檢視器 Web 組件作為目標,該組件與 SharePoint 整合。The following SQL ServerSQL Server reserved report parameter names 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.

  • Toolbar:控制報表檢視器 Web 組件的工具列顯示。Toolbar: Controls the toolbar display for the Report Viewer Web Part. 預設值是 Full秒。The 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.

  • HeaderArea:控制報表檢視器 Web 組件的標頭顯示。HeaderArea: Controls the header display for the Report Viewer Web Part. 預設值是 Full秒。The 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.

  • DocMapAreaWidth:控制參數區在報表檢視器 Web 組件中的顯示寬度 (以像素為單位)。DocMapAreaWidth: 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.

  • AsyncRender:控制是否要以非同步方式轉譯報表。AsyncRender: 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.

  • ParamMode:控制報表檢視器 Web 組件的參數提示區域,在整頁檢視中的顯示方式。ParamMode: Controls how the Report Viewer Web Part's parameter prompt area is displayed in full-page view. 預設值是 Full秒。The 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.

  • DocMapMode:控制報表檢視器 Web 組件的文件引導模式區域,在整頁檢視中的顯示方式。DocMapMode: Controls how the Report Viewer Web Part's document map area is displayed in full-page view. 預設值是 Full秒。The 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.

  • DockToolBar:控制報表檢視器 Web 組件工具列是否停駐在頂部或底部。DockToolBar: Controls whether the Report Viewer Web Part's toolbar is docked to the top or bottom. 有效值為 TopBottomValid values are Top and Bottom. 預設值是 Top秒。The default value is Top.

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

  • ToolBarItemsDisplayMode:控制要顯示的工具列項目。ToolBarItemsDisplayMode: 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)
使用 URL 存取匯出報表Export a Report Using URL Access