將報表發行至報表伺服器Publishing Reports to a Report Server

在您設計和測試完報表或報表集之後,您可以使用 SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 中的部署功能,將報表發行至報表伺服器。After you have designed and tested a report or set of reports, you can use the deployment features in SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) to publish the reports to a report server. 您可以發行個別報表,或可包含多個報表和資料來源的報表伺服器專案。You can publish individual reports or a Report Server project which can include multiple reports and data sources. 發行報表伺服器專案是發行多份報表最簡單的方式。Publishing a Report Server project is the easiest way to publish multiple reports. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)會使用詞彙部署,而不是一詞發行 uses the term deploy, instead of the term publish. 這兩個詞可以互換。The two terms are interchangeable.

SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 會提供專案組態來管理報表發行。 provides project configurations for managing report publication. 組態會指定報表伺服器的位置、報表伺服器上所安裝之 SQL Server Reporting Services 的版本、是否覆寫發行到報表伺服器的資料來源等等。The configuration specifies the location of the report server, the version of SQL Server Reporting Services installed on the report server, whether the data sources published to the report server are overwritten and so forth. 例如,"Debug" 組態可以發行至與 "Release" 組態不同的伺服器。For example, the "Debug" configuraiton can publish to a different server than the "release" configuration. 除了使用 SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 所提供的組態,您還可以建立其他組態。In addition to using the configurations that SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) provides, you can create additional configurations.

發行需求Requirements to Publish

權限是透過由您報表伺服器管理員所定義的角色安全性所決定。Permission is determined through role-based security that is defined by your report server administrator. 發行作業一般是透過 發行者角色授與。Publishing operations are typically granted through the Publisher role.

專案組態Project Configurations

您的報表環境可能已安裝多部報表伺服器以及不同版本的 Reporting ServicesReporting ServicesYour reporting environment might have multiple report servers and different versions of Reporting ServicesReporting Services installed. 您可以建立多個組態,然後根據部署狀況,使用不同的組態。You can create multiple configurations and then use a different one depending the deployment scenario. 專案組態包括建立報表的屬性,例如,暫時儲存已建立之報表的資料夾,以及如何處理建立問題。Project configurations include properties for building reports, such as the folder in which to temporarily store the built reports, and how to handle build issues. 組態也包含您用來指定報表伺服器之位置與版本、報表伺服器上之資料夾的屬性。The configurations also have properties that you use to specify the location and version of the report server, the folders on the report server.

根據預設, SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 提供三種專案組態: DebugLocalDebugReleaseBy default, SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) provides three project configurations: DebugLocal, Debug, and Release. 預設組態為 DebugLocal。The default configuration is DebugLocal. 您通常可以使用 DebugLocal 組態在本機預覽視窗中檢視報表、使用 Debug 組態將報表發行至測試伺服器,以及使用 Release 組態將報表發行至實際伺服器。You typically use the DebugLocal configuration to view reports in a local preview window, the Debug configuration to publish reports to a test server, and the Release configuration to publish reports to a production server. 在標準工具列上的方案組態下拉式清單中會顯示使用中的組態。The solution configurations drop-down list on the Standard toolbar shows the active configuration. 若要使用不同的組態,請從清單中進行選取。To use a different configuration, select it from the list.

ssrs_project_properties

如需詳細資訊,請參閱下列內容For more information, see the following

若要發行專案中的所有報表To publish all reports in a project

建置功能表上,按一下 部署<報表專案名稱 >On the Build menu, click Deploy <report project name>. 或者,在方案總管中,以滑鼠右鍵按一下報表專案,然後按一下 [部署]。Alternatively, in Solution Explorer, right-click the report project and then click Deploy. 您可以在 [輸出] 視窗中,檢視發行程序的狀態。You can view the status of the publishing process in the Output window.

當您部署報表伺服器專案時,也會部署報表專案中的共用資料來源。When you deploy a Report Server project, the shared data sources in the report project are also deployed. 所有報表都可以使用相同的報表組態,部署至相同的報表伺服器、伺服器上相同的資料夾等等。All reports are deployed using the same project configuration: to the same report server, the same folder on the server, and so on. 若要將報表發行至不同的伺服器,請逐個報表發行,或僅包含報表伺服器專案中您要發行的報表。To publish reports to different servers, either publish them one by one or include only reports you want to in the Report Server project. 一個方案可以包含多個報表伺服器專案,而且,使用多個專案可能會讓報表部署的管理更為容易,因為您可以使用不同的組態部署不同的專案。A solution can include multiple Report Server projects, and using multiple project might make it easier to manage the deployment of reports because you can use a different configuration to deploy different projects.

若要發行單一報表To publish a single report

在 [方案總管] 中,以滑鼠右鍵按一下報表,然後按一下 [部署]In Solution Explorer, right-click the report and then click Deploy. 您可以在 [輸出] 視窗中,檢視發行程序的狀態。You can view the status of the publishing process in the Output window.

當您發行報表時,也必須部署該報表所使用的共用資料來源。When you publish a report, you must also deploy the shared data sources that the report uses.
如果您不要發行專案中的所有報表,可以只選擇發行單一報表。If you do not want to publish all reports in a project, you can chose to publish only a single report. 若要這樣做,請選取部署報表 (例如,發行組態) 的組態,以滑鼠右鍵按一下報表,然後按一下部署To do this, select a configuration that deploys the report (for example, the Release configuration), right-click the report, and then click Deploy.

如果報表使用共用資料來源,您也必須部署共用資料來源,否則將不會執行部署的報表。If a report uses a shared data source, you need to also deploy the shared data source or the deployed report will not run. 以滑鼠右鍵按一下共用的資料來源,然後按一下 部署Right-click the shared data source and then click Deploy.

您必須指定報表伺服器的目標伺服器 URL,並視需要變更負責部署報表和共用資料來源的預設資料夾。The target server URL of the report server must be specified and you might want to change the default folders to which reports and shared data sources deploy.

請參閱<See Also

專案屬性頁對話方塊 Project Property Pages Dialog Box
報表伺服器內容管理 (SSRS 原生模式) Report Server Content Management (SSRS Native Mode)
升級報表Upgrade Reports