報表設計師中的報表組件 (SSRS)Report Parts in Report Designer (SSRS)

在報表設計師中,建立專案的資料表、圖表及其他分頁報表項目之後,您可以將它們當作 「報表組件」 發行至報表伺服器或與報表伺服器整合的 SharePoint 網站,以供您和其他人員在其他報表中重複使用這些組件。In Report Designer, after you create tables, charts, and other paginated report items in a project, you can publish them as report parts to a report server or SharePoint site integrated with a report server so that you and others can reuse them in other reports.

一般來說,報表組件在報表設計師和報表產生器中的運作方式都相同。In general, report parts function the same way in Report Designer and in Report Builder. 若要了解基本功能,請參閱報表組件 (報表產生器及 SSRS)To read about basic functionality, see Report Parts (Report Builder and SSRS).

報表組件在報表設計師中運作的方式有基本的差異。There are fundamental differences in the way report parts work in Report Designer. 主要差異在於工作流程。A main difference is the work flow. 報表產生器可進行共同作業式撰寫:我建立報表組件並加以發行。Report Builder enables collaborative authoring: I create a report part and publish it. 您可以重複使用、修改,並重新發行。You can reuse, modify, and republish it. 在報表設計師中,發行作業是單向的:我可以從報表設計師發行報表組件,而且您可以重複使用它。In Report Designer, publishing is one-way: I can publish a report part from Report Designer, and you can reuse it. 但是,我無法在報表設計師的報表中重複使用現有的報表組件。But I cannot reuse an existing report part in a report in Report Designer. 本主題會先快速介紹報表組件的概觀,然後再詳細說明這些差異。This topic elaborates on these differences, after a quick overview of report parts.

報表組件發行的生命週期Life Cycle of Report Part Publishing

rs_ComponentCreationrs_ComponentCreation

  1. 在報表設計師中,某甲建立專案,其中包含的報表具有以內嵌資料集為依據的圖表。In Report Designer, Person A creates a project that contains a report with a chart that depends on an embedded dataset.

  2. 某甲為含內嵌資料集的圖表加上旗標,以供發行。Person A flags the chart with its embedded dataset for publishing. 報表設計師為它指派唯一識別碼。Report Designer assigns it a unique ID. 然後,某甲將報表部署至報表伺服器。Person A then deploys the report to the report server. 報表設計師發行該圖表。Report Designer publishes the chart.

  3. 某乙在報表產生器中建立空白報表,並將圖表加入其中。Person B creates a blank report in Report Builder and adds the chart to it. 現在,該圖表加上內嵌資料集都是某乙報表的一部分。The chart is now part of Person B's report, along with the embedded dataset. 某乙可以修改報表中的圖表執行個體與資料集。Person B can modify the instances of the chart and dataset that are in the report. 這項作業對報表伺服器上的圖表執行個體和資料集不會有任何影響,也不會中斷報表中與報表伺服器上執行個體之間的關聯性。This will have no effect on the instances of the chart and dataset on the report server, nor will it break the relationship between the instances in the report and on the report server.

    rs_BIDScomponentupdaters_BIDScomponentupdate

  4. 在報表設計師中,某甲修改原始報表中的圖表。In Report Designer, Person A modifies the chart in the original report.

  5. 某甲重新部署報表,將該圖表重新發行至伺服器,因而更新了伺服器上的圖表。Person A redeploys the report, which republishes the chart to the server, thus updating the chart on the server.

  6. 在報表產生器中,某乙接受來自伺服器的已更新圖表。In Report Builder, Person B accepts the updated chart from the server. 這會覆寫某乙在自己報表中對圖表所做的變更。This overwrites the changes that Person B had made to the chart in Person B's report.

發行報表組件Publishing Report Parts

當您發行報表組件時,報表設計師會為它指派唯一的識別碼。When you publish a report part, Report Designer assigns it a unique ID. 此後,它就維持該識別碼,無論您做什麼變都一樣。From then on, it maintains that ID, no matter what else you change about it. 識別碼會連結您報表中的原始報表項目至報表組件。The ID links the original report item in your report to the report part. 當其他報表作者在報表產生器中重複使用此報表組件時,該識別碼也將他們的報表連結到該報表組件。When other report authors reuse the report part in Report Builder, the ID also links the report part in their report to the report part.

以下是您可以發行為報表組件的報表項目:These are the report items you can publish as report parts:

  • 圖表Charts

  • 量測計Gauges

  • 影像和內嵌影像Images and embedded images

  • 地圖Maps

  • 參數Parameters

  • 矩形Rectangles

  • 資料表Tables

  • 矩陣Matrices

  • 清單Lists

    如果您發行的報表組件會顯示資料,如資料表、矩陣或圖表,您可以共用資料集為其根據,否則,當您發行該報表組件時,所根據的資料集會儲存為內嵌資料集。If you are publishing a report part that displays data, such as a table, matrix, or chart, you can base it on a shared dataset; otherwise, when you publish the report part, the dataset that it depends on is saved as an embedded dataset. 內嵌資料集可以使用內嵌資料集來源為根據,但認證並未儲存於內嵌資料集來源中。Embedded datasets can be based on embedded data sources, but credentials are not stored in embedded data sources. 因此,如果您的報表組件是以使用內嵌資料來源的內嵌資料集為依據,任何人只要重複使用此報表組件都必須提供內嵌資料來源的認證。Thus, if your report part depends on an embedded dataset that uses an embedded data source, anyone who reuses this report part will need to provide the credentials for the embedded data source. 若要避免這種情形,請以含預存認證的共用資料來源做為內嵌和共用資料集的根據。To avoid this, base your embedded and shared datasets on shared data sources with stored credentials. 如需詳細資訊,請參閱 報表產生器中的報表組件和資料集For more information, see Report Parts and Datasets in Report Builder.

    在報表設計師中發行報表組件的程序有兩個步驟:Publishing a report part in Report Designer is a two-step process:

  1. [發行報表組件] 對話方塊中,將您要發行的報表項目加上旗標。Flag the report items that you want to publish in the Publish Report Parts dialog box.

  2. 部署報表。Deploy the report.

    部署報表時,報表組件會發行至 SharePoint 網站或報表伺服器,讓其他人也可以重複使用。When you deploy the report, the report part is published to a SharePoint site or report server, and others can reuse it. 若要發行報表組件,必須具有報表伺服器的連線,並在部署報表時具有該伺服器上足夠的權限。To publish a report part, you must have a connection to and sufficient permissions on a report server when you deploy the report.

重複使用報表組件Reusing Report Parts

跟報表產生器不同的是:您無法在建立報表組件之專案外的任何專案中,搜尋並重複使用該報表組件。Unlike in Report Builder, you cannot search for and reuse a report part in a project other than the one in which it was created.

在報表產生器中工作的報表作者可以在他們建立的報表中,搜尋並重複使用您所發行的報表組件。Report authors working in Report Builder can search for and reuse report parts that you publish in reports that they create.

重新發行報表組件Republishing Report Parts

在報表設計師中,您必須從建立組件的報表之中,更新現有的報表組件。In Report Designer, you should update an existing report part from within the report in which you created it. 在報表產生器中,報表作者可以重複使用報表組件,並將其發行為新的報表組作,而不會取代您所發行的報表組件。In Report Builder, report authors can reuse the report part, and publish it as a new report part without replacing the report part that you published. 如果有足夠的權限,他們也可以更新您所發行的報表組件。If they have sufficient permissions they can also update the report part that you published. 任何人只要在網站或伺服器上具有足夠的資料夾權限,都可以更新儲存於該處的報表組件。Anyone with sufficient permissions for a folder on a site or server can update the report parts stored there. 最後的更新會覆寫先前的更新。The last update overwrites previous updates.

您可以修改,然後將報表組件重新發行到網站或伺服器。You can modify and then republish the report part to the site or server. 報表產生器報表作者如果已經將該報表組件加入報表中,下次開啟該報表時就會接到變更的通知。Report Builder report authors who have added that report part to a report are informed of the change the next time they open that report. 他們可以選擇接受您所做的變更與否。They can choose to accept your changes or not.

您也可以選擇將已經發行過的報表當做新報表來發行。You can also choose to publish as new a report that you have already published. 請在 [發行報表組件] 對話方塊中,按一下 [發行為新報表組件]。In the Publish Report Parts dialog box, click the Publish as a new report part. 這個新的報表組件會有新的唯一識別碼,而且和舊的報表組件沒有關聯性。This new report part has a new unique ID and no relationship to the old report part.

後續步驟Next steps

管理報表組件Managing Report Parts

更多問題嗎?More questions? 請嘗試詢問 Reporting Services 論壇Try asking the Reporting Services forum