設定部署屬性 (Reporting Services)Set Deployment Properties (Reporting Services)

SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,您必須為報表及共用資料來源指定報表伺服器和資料夾 (選擇性),讓您可以將報表伺服器專案中的項目發行至報表伺服器。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), you must specify the report server and optionally the folders for reports and shared data sources so that you can publish the items in a Report Server project to a report server. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 需要建立、預覽部署報表的屬性和值都儲存在報表伺服器專案的專案組態中。The properties and values that SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) needs to build, preview an deploy reports are stored in project configurations of the Report Server project. 您可以為這些專案屬性建立多個命名集,讓您可以在屬性集之間方便地切換。You can create multiple named sets for these project properties, so that you can conveniently switch between property sets. 每一組屬性都是一個組態。Each set of properties is a configuration. 例如,您可以擁有一個組態將報表發行到測試伺服器,並有另一個組態將報表發行到實際伺服器。For example, you can have a configuration for publishing reports to a test server and a different configuration for publishing reports to a production server.

使用組態管理員可在專案組態中建立及管理專案屬性的集合。Use Configuration Manager to create and manage sets of project properties in project configurations. 組態管理員是 Visual StudioVisual Studio支援的功能, SQL Server Data ToolsSQL Server Data Tools 是以它為基礎。Configuration Manager is a feature supported by Visual StudioVisual Studio, on which SQL Server Data ToolsSQL Server Data Tools is based.

注意

請不要將這項功能與 Reporting Services 組態管理員搞混,後者是用來在安裝之後設定 Reporting Services。Do not confuse this feature with the Reporting Services Configuration Manager, which is used to configure Reporting Services after installation. 如需詳細資訊,請參閱設定和管理報表伺服器 (SSRS 原生模式)For more information, see Configure and Administer a Report Server (SSRS Native Mode).

注意

SQL Server Data ToolsSQL Server Data Tools 中,從報表伺服器專案或解決方案發行報表的動作稱為「部署報表」。In SQL Server Data ToolsSQL Server Data Tools, the action of publishing reports from a Report Server project or solution is known as deploying reports.

若要設定部署屬性To set deployment properties

  1. 以滑鼠右鍵按一下報表專案,然後按一下 [屬性]。Right-click the report project, and then click Properties.

  2. 在專案的 [屬性頁面] 對話方塊中,從 [組態] 清單中選取要編輯的組態。In the Property Pages dialog box for the project, select a configuration to edit from the Configuration list. 常見的組態為 DebugLocalDebugReleaseCommon configurations are DebugLocal, Debug, and Release.

    注意

    您可以使用多個組態,在不同的報表伺服器或設定之間快速切換。You can use multiple configurations to switch quickly between different report servers or settings.

  3. 在 [OutputPath] 文字方塊中,鍵入或貼入本機檔案系統中的路徑,以儲存用於報表組建驗證、部署及預覽的報表定義。In the OutputPath textbox, type or paste the path in your local file system to store the report definition used in build verification, deployment, and preview of reports. 此路徑必須不同於專案所使用的路徑以及位於專案路徑下之子資料夾的相對路徑。The path must be different than the path that you use for the project and a relative path that is a child folder under the path of the project.

  4. 在 [ErrorLevel] 文字方塊中,鍵入回報為錯誤之組建問題的嚴重性。In the ErrorLevel text box, type the severity of the build issues that are reported as errors. 建置嚴重性層級小於或等於 [ErrorLevel] 值之報表、資料來源或其他專案資源時,所發生的問題會回報為錯誤;否則,系統會將這些問題回報為警告。Issues occurring when building reports, data sources, or other project resources with severity levels less than or equal to the value of ErrorLevel are reported as errors; otherwise, the issues are reported as warnings. 任何錯誤都會導致建立工作失敗。Any error will cause the build task to fail. 有效的嚴重性層級為 0 到 4 (包含)。The valid severity levels are 0 through 4 inclusive. 預設值為 2。The default value is 2.

    [ErrorLevel] 可用來增加或減少組建的敏感度。ErrorLevel can be used to increase or decrease the sensitivity of the build. 例如,在部署到 SQL Server 2008SQL Server 2008 報表伺服器期間建立包含對應的報表時,預設會顯示一個錯誤,而且報表的建立會失敗。For example, when a report with a map is built during deployment to a SQL Server 2008SQL Server 2008 report server an error displays by default and building the report fails. 如果您降低 [ErrorLevel],就會從報表移除對應、顯示警告,並繼續建置報表。If you lower ErrorLevel the map is removed from the report, a warning displays, and building the report continues.

  5. 在 [StartItem] 清單中,選取執行報表專案時,要顯示在預覽視窗或瀏覽器視窗中的報表。In the StartItem list, select a report to display in the preview window or in a browser window when the report project is run.

  6. 在 [OverwriteDataSources] 清單中,選取 [True] 即可在每次發行共用資料來源時覆寫伺服器上的共用資料來源,或選取 [False] 則可保留伺服器上的資料來源。In the OverwriteDataSources list, select True to overwrite the shared data source on the server each time shared data sources are published, or select False to keep the data source on the server.

  7. 在 [TargetServerVersion] 清單中,選取 SQL Server 2016 版本的 Reporting ServicesReporting Services,或選取 [偵測版本] 以自動判斷安裝在 TargetServer URL 屬性所識別之伺服器上的版本。In the TargetServerVersion list, select SQL Server 2016 version of Reporting ServicesReporting Services or select Detect Version to automatically determine the version installed on the server identified by the TargetServer URL property. 預設值為 SQL Server 2016 或更新版本The default value is SQL Server 2016 or later.

    使用 TargetServerVersion 針對 TargetServer URL 中指定的報表伺服器版本自訂已建置的報表 (放在 OutputPath 中指定的路徑)。Use TargetServerVersion to customize the built reports, placed in the path specified in OutputPath, for the version of the report server specified in TargetServer URL.

  8. 在 [TargetDataSourceFolder] 文字方塊中,鍵入報表伺服器上的資料夾,以放入已發行的共用資料來源。In the TargetDataSourceFolder text box, type the folder on the report server in which to place the published shared data sources. [TargetDataSourceFolder] 的預設值為 Data Sources。The default value for TargetDataSourceFolder is Data Sources. 如果這個值保留空白,資料來源就會發行至 [TargetReportFolder] 中所指定的位置。If you leave this value blank, the data sources will be published to the location specified in TargetReportFolder.

  9. 在 [TargetReportFolder] 文字方塊中,鍵入報表伺服器上的資料夾,以放入已發行的報表。In the TargetReportFolder text box, type the folder on the report server in which to place the published reports. [TargetReportFolder] 的預設值為報表專案的名稱。The default value for TargetReportFolder is the name of the report project.

    注意

    如果是以原生模式執行的報表伺服器,您必須具有目標資料夾的「發行」權限,才能將報表發行至該資料夾。For a report server running in native mode, you must have Publish permissions on the target folder to publish reports to that folder. 「發行」權限是透過將您的使用者帳戶對應到包含發行作業之角色的角色指派來提供。Publish permissions are provided through a role assignment that maps your user account to a role that includes publish operations. 如需詳細資訊,請參閱 建立和管理角色指派For more information, see Create and Manage Role Assignments. 如果是以 SharePoint 整合模式執行的報表伺服器,您必須具有 SharePoint 網站的「成員」或「擁有者」權限。For a report server running in SharePoint integrated mode, you must have Member or Owner permission on the SharePoint site. 如需詳細資訊,請參閱 報表伺服器項目的 SharePoint 網站和清單權限參考For more information, see SharePoint Site and List Permission Reference for Report Server Items.

  10. 在 [TargetServerURL] 文字方塊中,鍵入目標報表伺服器的 URL。In the TargetServerURL text box, type the URL of the target report server. 在發行報表之前,您必須設定此屬性為有效的報表伺服器 URL。Before you publish a report, you must set this property to a valid report server URL. 當您發行至以原生模式執行的報表伺服器時,請使用報表伺服器之虛擬目錄的 URL (例如 http://server/reportserver 或 https://server/reportserver)。When publishing to a report server running in native mode, use the URL of the virtual directory of the report server (for example, http://server/reportserver or https://server/reportserver). 這是報表伺服器的虛擬目錄,而非報表管理員。This is the virtual directory of the report server, not Report Manager.

    發行至以 SharePoint 整合模式執行的報表伺服器時,請使用 SharePoint 頂層網站或子網站的 URL。When publishing to a report server running in SharePoint integrated mode, use a URL to a SharePoint top-level site or subsite. 如果您未指定網站,則會使用預設頂層網站 (例如 http://伺服器名稱、http://伺服器名稱/網站或 http://伺服器名稱/網站/子網站)。If you do not specify a site, the default top-level site is used (for example, http://servername, http://servername/site or http://servername/site/subsite).

設定組態管理員屬性To set Configuration Manager properties

  1. 以滑鼠右鍵按一下報表專案,然後按一下 [屬性]。Right-click the report project, and then click Properties.

  2. 在專案的 [屬性頁面] 對話方塊中,按一下 [組態管理員]。In the Property Pages dialog box for the project, click Configuration Manager.

  3. 在 [組態管理員] 對話方塊中,選取要編輯的組態。In the Configuration Manager dialog box, select the configuration to edit. 目前使用中的組態會顯示為 [使用中 (<組態>)]The currently active configuration is displayed as Active(<configuration>).

  4. 在 [專案內容] 中,針對方案中的每個專案,選取或清除 [建立] 或 [部署]。In Project Contexts, for each project in the solution, select or clear Build or Deploy.

    注意

    如果選取 [建置],則報表設計師會建置報表專案,並在預覽或發行至報表伺服器之前,先檢查是否有錯誤。If Build is selected, Report Designer builds the report project and checks for errors before previewing or publishing to a report server. 如果選取 [部署],則報表設計師會依照部署屬性中的定義,將報表發行至報表伺服器。If Deploy is selected, Report Designer publishes the reports to the report server as defined in deployment properties. 如果未選取 [部署],報表設計師會在本機預覽視窗內,顯示 StartItem 屬性中指定的報表。If Deploy is not selected, Report Designer displays the report specified in the StartItem property in a local preview window.

另請參閱See Also

發行資料來源與報表 Publishing Data Sources and Reports
預覽報表 Previewing Reports
報表設計師 F1 說明 Report Designer F1 Help
SharePoint 模式中報表伺服器上已發行報表項目的 URL 範例 (SSRS) URL Examples for Published Report Items on a Report Server in SharePoint Mode (SSRS)
專案屬性頁對話方塊 Project Property Pages Dialog Box
將報表發行至報表伺服器Publishing Reports to a Report Server