SQL Server 資料工具中的 Reporting Services (SSDT)Reporting Services in SQL Server Data Tools (SSDT)

SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)MicrosoftMicrosoft Visual StudioVisual Studio 環境,可用於建立商務智慧解決方案。 is a MicrosoftMicrosoft Visual StudioVisual Studio environment for creating business intelligence solutions. SSDT 的主要功能之一是提供報表設計師的撰寫環境,讓您可以從中開啟、修改、預覽、儲存及部署 Reporting ServicesReporting Services 編頁報表定義、共用的資料來源、共用資料集與報表組件。SSDT features the Report Designer authoring environment, where you can open, modify, preview, save, and deploy Reporting ServicesReporting Services paginated report definitions, shared data sources, shared datasets, and report parts. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)不會包含與 SQL Server。 is not included with SQL Server. 下載 SQL Server Data ToolsDownload SQL Server Data Tools.

此主題描述用於 SQL Server Data ToolsSQL Server Data ToolsReporting ServicesReporting Services方案、專案、專案範本和組態,以及您可以在 [報表設計師] 中使用的檢視、功能表、工具列和快速鍵。This topic describes SQL Server Data ToolsSQL Server Data Tools solutions, projects, project templates, and configurations used for Reporting ServicesReporting Services, and the views, menus, toolbars, and shortcuts that you can use in Report Designer.

若要開始設計報表,請參閱使用報表設計師設計報表 (SSRS)To get started designing reports, see Design Reports with Report Designer (SSRS).

方案與專案 Solutions and Projects

報表專案是做為報表定義與資源的容器。A report project acts as a container for report definitions and resources. 部署專案時,報表專案中的每一個檔案都會發行至報表伺服器。Every file in the report project is published to the report server when the project is deployed. 當您第一次建立專案時,同時也會建立該專案的方案,以做為專案的容器。When you create a project for the first time, a solution is also created as a container for the project. 您可以將多個專案加入單一方案。You can add multiple projects to a single solution.

組態 Configurations

若要針對不同部署建立多組專案屬性,例如企業測試和實際報表伺服器,請使用組態管理員。To create multiple sets of project properties for deployment variations such as enterprise test and production report servers, use the Configuration Manager. 如需詳細資訊,請參閱 SQL Server 資料工具中的部署和版本支援 (SSRS)之中。For more information, see Deployment and Version Support in SQL Server Data Tools (SSRS).

報表伺服器專案 Report Server Projects

當您安裝 Reporting ServicesReporting Services時, SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)提供了下列專案範本:When you install Reporting ServicesReporting Services, the following project templates are made available in SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT):

  • 報表伺服器專案。Report Server Project. 當您選取報表伺服器專案時,就會開啟報表設計師。When you select a Report Server Project, Report Designer opens. 報表伺服器專案是由 Visual StudioVisual Studio 所安裝的商業智慧專案範本,而且可從 [新增專案] 對話方塊取得。A Report Server Project is a Business Intelligence Projects template installed by Visual StudioVisual Studio that is available from the New Project dialog box. 如需詳細資訊,請參閱將新的或現有的報表加入至報表專案 (SSRS ).報表伺服器專案屬性會套用到所有報表及所有共用資料來源中 SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)專案。For more information, see Add a New or Existing Report to a Report Project (SSRS).Report Server project properties apply to all reports and all shared data sources in a SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) project. 這些屬性包括報表伺服器的 URL 以及報表和共用資料來源的資料夾名稱。These properties include the URL for the report server and the folder names for reports and shared data sources. 使用 [專案屬性頁面] 對話方塊可檢視目前的屬性值。Use the Project Property Pages dialog box to view the current property values. 若要開啟此對話方塊,請從 [專案] 功能表按一下 [屬性] 。To open this dialog box, on the Project menu, click Properties.

  • 報表伺服器專案精靈。Report Server Project Wizard. 當您選取報表伺服器精靈專案時,就會自動建立報表伺服器專案,而且報表精靈會開啟。When you select a Report Server Wizard Project, a report server project is automatically created, and the Report Wizard opens. 在此精靈中,您可以遵循每一頁的指示來建立報表,以便建立與資料來源的連接字串、設定資料來源認證、設計查詢、加入資料表或矩陣資料區、指定報表資料和群組、挑選字型和色彩樣式、將報表發行到報表伺服器,以及在本機預覽報表。In the wizard, you can create a report by following instructions on each page to create a connection string to a data source, set data source credentials, design a query, add a table or matrix data region, specify report data and groups, pick a font and color style, publish the report to a report server, and preview the report locally. 當您使用精靈建立報表之後,您可以在報表伺服器專案中使用報表設計師來變更報表資料和報表設計師。After you create a report with the wizard, you can change the report data and the report designer by using Report Designer in the Report Server project.

    在 SSDT 中的新專案範本New Project templates in SSDT

報表設計師視窗和窗格 Report Designer Windows and Panes

報表設計師支援兩種檢視: [設計] (可定義報表資料和報表配置) 和 [預覽] (可顯示報表的轉譯檢視)。Report Designer supports two views: Design to define the report data and report layout, and Preview to display a rendered view of the the report. 在每個檢視中,您可以顯示多個視窗來協助設計或檢視轉譯的報表。In each view, you can display multiple windows to help you design or view a rendered report.

報表資料窗格 Report Data Pane

[報表資料] 窗格顯示內建欄位、資料來源、資料集、欄位集合、報表參數和影像。The Report Data pane displays built-in fields, data sources, datasets, field collections, report parameters, and images.

您可以使用 [報表資料] 窗格來檢視:Use the Report Data pane to view:

  • 內建欄位 :預先定義的報表資訊,例如報表名稱或處理報表的時間。Built-in Fields Predefined report information such as the report name or the time the report was processed.

  • 資料來源 :資料來源代表資料來源的名稱及連接。Data sources A data source represents a name and connection to a source of data.

  • 資料集 :每個資料集都會包含指定要從資料來源中擷取哪些資料的查詢。Datasets Each dataset includes a query that specifies which data to retrieve from the data source. 您可以展開資料集,以便檢視資料集查詢所指定的欄位集合。Expand the dataset to view the collection of fields specified by the dataset query.

    在多維度資料集的某些查詢設計工具中,您可以在 [篩選] 窗格中指定篩選,然後指出是否要建立報表參數。In some query designers for multidimensional datasets, you can specify filters in the Filters pane and indicate whether to create report parameters. 若您指定報表參數選項,系統就會自動建立特殊資料集,以擴展參數的有效值清單。If you specify the report parameter option, a special dataset is automatically created to populate the parameter’s valid values list. 根據預設,此資料集不會出現在 [報表資料] 窗格內。By default, the dataset does not appear in the Report Data Pane. 如需詳細資訊,請參閱 Show Hidden Datasets for Parameter Values for Multidimensional Data (Report Builder and SSRS) (針對多維度資料的參數值顯示隱藏的資料集 (報表產生器及 SSRS))。For more information, see Show Hidden Datasets for Parameter Values for Multidimensional Data (Report Builder and SSRS).

  • 報表參數 :報表參數清單。Report parameters The list of report parameters. 資料集查詢包含查詢參數時,可以手動或自動建立參數。Parameters can be created manually or automatically when a dataset query includes query parameters.

  • 影像 :可用於併入為報表中「影像」報表項目的影像清單。Images The list of images that are available to include as an Image report item in a report.

    [報表資料] 窗格中的資料來源和資料集代表報表定義中的元素。Data sources and datasets in the Report Data pane represent the elements in the report definition. [報表資料] 窗格是多個報表撰寫環境所支援的功能。The Report Data pane is a feature supported by multiple report authoring environments. 在 [報表產生器] 中,這是唯一可用於管理資料來源和資料集的窗格。In Report Builder, it is the only pane available for managing data sources and datasets. 在 [報表設計師] 中,[報表資料] 窗格是與 [方案總管] 搭配使用,而後者會將共用資料來源和共用資料集列出為檔案。In Report Designer, the Report Data pane works with Solution Explorer, which lists shared data sources and shared datasets as files. [報表資料] 窗格中的共用資料來源和共用資料集,必須指向它們在 [方案總管] 中的對應「共用資料來源」和「共用資料集」。Shared data sources and shared datasets in the Report Data pane must point to their corresponding Shared Data Sources and Shared Datasets in Solution Explorer. 之後,[報表資料] 窗格元素就會包含 [方案總管] 中資料檔案的參考。The Report Data pane elements then contain a reference to the data files in Solution Explorer. 專案屬性可決定是否將共用資料來源和共用資料集部署至報表伺服器或 SharePoint 網站。The project properties determine whether the shared data sources and shared datasets are deployed to the report server or SharePoint site. 如需詳細資訊,請參閱轉換資料來源 (報表產生器及 SSRS ).For more information, see Convert Data Sources (Report Builder and SSRS).

注意

如果您看不到 [報表資料] 窗格,請按一下 [設計] 區,然後再按一下 [檢視] 功能表上的 [報表資料] 。If you do not see the Report Data pane, click in the Design area and then on the View menu, click Report Data. 如果 [報表資料] 窗格是浮動窗格,您可以錨定它。If the Report Data pane is floating, you can anchor it. 如需詳細資訊,請參閱停駐報表設計師中的報表資料窗格 (SSRS)For more information, see Dock the Report Data Pane in Report Designer (SSRS).

群組窗格 Grouping Pane

使用 [群組] 窗格,即可定義 Tablix 資料區的群組。Use the Grouping pane to define groups for a tablix data region. 您可以定義資料表的資料列群組和詳細資料群組,以及矩陣的資料列和資料行群組。You can define row groups and detail groups for tables and row and column groups for matrices. 您無法使用 [群組] 窗格定義 [圖表] 或其他資料區的群組。You cannot use the Grouping pane to define groups for Charts or other data regions. 如需詳細資訊,請參閱了解群組 (報表產生器及 SSRS)For more information, see Understanding Groups (Report Builder and SSRS).

[群組] 窗格有兩種模式:The Grouping pane has two modes:

  • 預設值。Default. 使用 [預設值] 模式以階層格式顯示所有資料列及資料行群組,其中顯示父群組、子群組、相鄰群組及詳細資料群組的關聯性。Use the Default mode to display all row and column groups in a hierarchical format that shows the relationship of parent groups, child groups, adjacent groups, and detail groups. 子群組會顯示在下一個縮排層級 (相較於其父群組而言) 的下方。A child group appears under and at the next indent level compared to its parent group. 相鄰群組會與其對等或同層級群組顯示在相同的縮排層級上。An adjacent group appears at the same indent level as its peer or sibling groups.

    您可以使用預設模式來加入、編輯或刪除群組。Use default mode to add, edit, or delete groups. 若為以單一資料集欄位為基礎的群組,則可以將欄位拖曳至 [資料列群組] 或 [資料行群組] 窗格。For groups based a single dataset field, drag the field to the Row Groups or Column Groups pane. 您可以在現有的群組上方或下方插入群組。You can insert the group above or below an existing group. 若要加入相鄰群組,請以滑鼠右鍵按一下同層級群組,然後使用快速鍵功能表。To add an adjacent group, right-click the sibling group, and use the shortcut menu. 若要顯示屬於某個群組的 Tablix 資料格,請選取 [群組] 窗格中的群組。To display which tablix cells belong to a group, select the group in the Grouping pane.

  • 進階:Advanced. 使用 [進階] 模式以顯示所選取 Tablix 資料區的靜態及動態資料列與資料行群組成員。Use the Advanced mode to display static and dynamic row and column group members of the selected tablix data region. 您必須使用群組成員來設定可控制與群組或群組成員相關聯之資料列和資料行可見性的屬性,或轉譯器用於嘗試將群組保持在同一頁的規則。You must use group members to set properties that control the visibility of the rows and columns associated with a group or group member, or the rules that renderers use to try to keep groups together on a page. 群組成員會顯示在設計介面上,當做資料列群組和資料行群組區域中的資料格。Group members appear on the design surface as cells in the row group and column group areas.

注意

若要切換 [預設值][進階] 模式,請以滑鼠右鍵按一下 [資料行群組] 圖示右邊的向下箭頭。To toggle between Default and Advanced modes, right-click the down arrow to the right of the Column Groups icon.

如需詳細資訊,請參閱< Grouping Pane>。For more information, see Grouping Pane.

工具箱 Toolbox

[工具箱] 包含可讓您拖曳至設計介面的報表項目。The Toolbox contains report items that you can drag to the design surface. 資料區是指您用於在報表上組織資料的報表項目。Data regions are report items that you use to organize data on the report. [資料表]、[矩陣]、[清單]、[圖表]、[量測計]、[資料橫條]、[走勢圖] 和 [指示器] 都是資料區。Table, Matrix, List, Chart, Gauge, Data Bar, Sparkline, and Indicator are data regions. 其他報表項目包含 [地圖]、[文字方塊]、[矩形]、[線條]、[影像] 和 [子報表]。Other report items include Map, Text Box, Rectangle, Line, Image, and Subreport. 如果您的系統管理員已經安裝並註冊自訂報表項目,這些項目可能也會顯示在此清單上。Custom report items might also appear on this list if they have been installed and registered by your system administrator.

屬性窗格 Properties Pane

[屬性] 窗格是標準的 Visual StudioVisual Studio 視窗,其中針對設計介面上目前選取的報表項目顯示屬性名稱和值。The Properties pane is a standard Visual StudioVisual Studio window that shows property names and values for the currently selected report item on the design surface. 在大部分情況下,屬性 (property) 名稱會對應至報表定義語言 (RDL) 檔案中的元素和屬性 (attribute)。In most cases, property names correspond to elements and attributes in the Report Definition Language (RDL) file. 您可以使用選取項目的 [屬性] 對話方塊來設定最常用的屬性。The most commonly used properties can be set by using the Properties dialog box for the selected item. 若要開啟對應的對話方塊,請按一下 [屬性] 窗格工具列上的 [屬性頁] 按鈕。To open the corresponding dialog box, click the Property Pages button on the Properties pane toolbar. 進階使用者可以直接在 [屬性] 窗格中設定屬性值。Advanced users can set property values directly in the Properties pane.

您可以使用 [屬性] 窗格以:Use the Properties pane to:

  • 設定設計介面上目前所選取項目的屬性。Set properties for the currently selected item on the design surface. 某些屬性會提供值的下拉式清單。Some properties provide a drop-down list of values. 您也可以直接在資料格中輸入值。You can also type the value directly in the cell. 某些屬性會包含值的集合,以 [(集合)] 值表示。Some properties contain a collection of values, indicated by the value (Collection). 大部分屬性都可以接受運算式。複雜運算式,值會指出<運算式 >Most properties can accept an expression; complex expressions are indicated by the value <Expression>. 按一下<運算式 >開啟運算式 對話方塊。Click <Expression> to open the Expression dialog box. 如需詳細資訊,請參閱< Expression Dialog Box>。For more information, see Expression Dialog Box.

  • 您可以使用 [屬性] 窗格工具列按鈕,將方格從類別目錄檢視變更為字母順序檢視。Use the Properties pane toolbar buttons to change the grid from category view to alphabetical view. 在類別目錄檢視中,您可能必須展開類別目錄,才能看見底下的所有屬性。In category view, you may need to expand a category to see all the properties under it. 若要開啟項目的 [屬性] 對話方塊,請按一下工具列上的 [屬性頁] 按鈕,或以滑鼠右鍵按一下項目,然後按一下 [屬性]To open an item's Properties dialog box, click the Property Pages button on the toolbar or by right-click the item and click Properties.

  • 設定 [群組] 窗格中目前所選取群組成員的屬性。Set properties for the currently selected group member in the Grouping pane. 群組成員屬性可協助控制每個群組執行個體之靜態群組頁首及頁尾資料列的重複方式。Group member properties help control how static group header and footer rows repeat for each group instance. 如需詳細資訊,請參閱顯示頁首和頁尾與群組 (報表產生器及 SSRS ).For more information, see Display Headers and Footers with a Group (Report Builder and SSRS).

    若要顯示 [屬性] 窗格,請在 [檢視] 功能表中,按一下 [屬性視窗]To display the Properties pane, from the View menu, click Properties Window. 您可以取消停駐此窗格並將它移至 SQL Server Data ToolsSQL Server Data Tools視窗的其他區域,或將它顯示成設計介面上的索引標籤式檢視。You can undock this pane and move it to another area of the SQL Server Data ToolsSQL Server Data Toolswindow, or display it as a tabbed view on the design surface.

方案總管 Solution Explorer

[方案總管] 是標準的 Visual StudioVisual Studio 元件,它會顯示專案中的所有項目。Solution Explorer is a standard Visual StudioVisual Studio component that displays all the items in your project. 若為報表伺服器專案,這包含用於組織共用資料來源、共用資料集、報表及資源的資料夾。For a Report Server project, this includes folders to organize shared data sources, shared datasets, reports and resources. 開啟方案檔時,會自動依字母順序來排列資料夾項目。Folder items are automatically alphabetized when you open the solution file. 若要檢視 [屬性] 窗格中的項目屬性,請選取項目。To view item properties in the Properties pane, select the item.

輸出 Output

當您預覽報表時,[輸出] 視窗就會顯示處理錯誤,而當您部署報表或共用資料來源時,則會顯示發行錯誤。The Output window displays processing errors when you preview a report, and publishing errors when you deploy a report or a shared data source.

使用 [輸出] 及 [文件大綱] 視窗,即可協助偵錯運算式中的錯誤。Use the Output and the Document Outline windows to help debug errors in expressions.

文件大綱 Document Outline

[文件大綱] 視窗會顯示報表定義中所有報表項目的階層式清單。The Document Outline window displays a hierarchical list of all report items in the report definition. 若要開啟 [文件大綱] 窗格,請在 [檢視] 功能表中,指向 [其他視窗] ,然後按一下 [文件視窗]To open the Document Outline pane, from the View menu, point to Other Windows and click Document Window.

您可以使用 [文件大綱] 窗格以協助依名稱識別文字方塊及其他報表項目。Use the Document Outline pane to help identify text boxes and other report items by name. 在 [文件大綱] 中選取項目時,也會在 [設計介面] 上選取該項目。When you select an item in the Document Outline, the item is also selected on the Design Surface.

工作清單 Task List

當您從 MicrosoftMicrosoft Access 等其他應用程式匯入報表時,[工作清單] 視窗就會顯示不支援功能的建立錯誤。The Task List window displays build errors for unsupported features when you import a report from another application, such as MicrosoftMicrosoft Access.

報表設計師設計檢視 Report Designer Design View

當您建立報表伺服器專案時,預設會以 [設計檢視] 開啟 [報表設計師],並顯示設計介面。By default, when you create a Report Server project, Report Designer opens in Design view and displays the design surface. 設計介面預設會顯示報表主體及報表背景。By default, the design surface displays the report body and the report background.

背景的快速鍵功能表會提供加入頁首和頁尾的選項,以及在 [檢視] 功能表中,提供顯示尺規和 [群組] 窗格的選項。The shortcut menu on the background provides options to add a page header and page footer, and from the View menu, display a ruler and the Grouping pane.

您可以使用顯示比例控制項來增加或減少報表的縮放比例。Use the zoom control to increase or decrease the magnification of the report.

若要設計報表,請將報表項目從 [工具箱] 拖曳至設計介面,然後設定其屬性,並改變它們在報表上的排列方式。To design a report, drag report items from the Toolbox to the design surface, and then configure their properties and alter their arrangement on the report.

報表設計師預覽 Report Designer Preview

使用 [預覽],即可執行報表並在報表檢視器中檢視轉譯的報表。Use Preview to run the report and view the rendered report in the report viewer. [預覽] 會在本機快取報表資料。Preview caches report data locally. 您也可以將組態屬性設定成使用瀏覽器並在偵錯檢視中執行報表。You can also set configuration properties to run the report in debug view, using a browser.

當您預覽報表時,報表設計師就會連接至報表資料來源、執行資料集查詢、在本機電腦上快取資料、處理報表以結合資料和配置,以及轉譯報表。When you preview a report, Report Designer connects to the report data sources, runs dataset queries, caches the data on the local computer, processes the report to combine data and layout, and renders the report. 您可以在 [預覽] 索引標籤中檢視報表,也可以設定專案屬性,以便在偵錯模式中檢視報表,以及直接在瀏覽器中檢視報表。You can view the report in on the Preview tab or you can set up project properties to view the report in debug mode and view it directly in a browser.

  • 預覽參數化報表。Previewing Parameterized Reports. 當您預覽報表時,如果所有報表參數都具有有效的預設值,系統就會自動處理報表。When you preview a report, the report is processed automatically if all report parameters have valid default values. 如果一或多個報表參數沒有有效的預設值,您就必須針對每個未指派的參數選擇值,然後在報表工具列上,按一下 [檢視報表]If one or more report parameters do not have a valid default value, you must choose a value for each unassigned parameter, and then, on the report toolbar, click View Report.

  • 了解本機資料快取 :當您預覽報表時,報表處理器就會使用目前的參數預設值以執行報表中資料集的所有查詢,然後將結果儲存為本機資料快取 (.rdl.data) 檔案。Understanding the Local Data Cache When you preview a report, the report processor runs all the queries for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file. 如果您沒有對報表資料集查詢或報表參數進行任何變更,就可以繼續設計報表,而不會造成再次擷取這項資料的負擔。You can continue to design your report without incurring the overhead of retrieving this data again if you make no changes to either the report dataset queries or the report parameters.

  • 使用 [組態管理員] 和 [偵錯] 來預覽報表。Previewing the Report using Configuration Manager and Debug. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,專案屬性會定義您想要如何部署和偵錯報表。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), project properties define how you want to deploy and debug your reports. 這些屬性會套用至專案中的所有報表和共用資料來源。These properties apply to all reports and shared data sources in the project. 若要設定專案屬性,請在 [專案] 功能表中,按一下 [屬性]To set the project properties, from the Project menu, click Properties. 您可以使用這些設定來測試專案,並將它們發行至報表伺服器。Use these settings to test your reports and publish them to the report server.

  • 監視 [輸出] 窗格是否有錯誤訊息。Monitoring the Output Pane for Error Messages. 當您預覽報表,而且報表處理器偵測到問題時,它就會將錯誤訊息寫入 [輸出] 窗格。When you preview a report and the report processor detects a problem, it writes error messages to the Output pane.

報表設計師的功能表 Report Designer Menus

當報表設計師專案在 SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中作用時,下列工具列就會加入至主要工具列。When a Report Designer project is active in SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), the following toolbars are added to the main toolbar. 報表設計師的功能表只會在 [設計] 檢視中顯示。The Report Designer menus are visible only when in Design view.

格式功能表 Format Menu

當您在設計介面上選取項目時, [格式] 功能表就會包含下列選項:When you select an item on the design surface, the Format menu contains the following options:

  • 前景色彩 :選取文字色彩。Foreground Color Select a text color. 黑色是預設文字色彩。Black is the default text color.

  • 背景色彩 :為您的文字方塊和資料區選取背景色彩。Background Color Select a background color for your text boxes and data regions.

  • 字型 :指定文字是粗體、斜體或加上底線。Font Specify whether the text is bold, italic, or underlined.

  • 左右對齊 :指定文字是靠右對齊、置中或靠左對齊。Justify Specify whether the text is right-aligned, centered, or left-aligned.

  • 對齊 :指定選取物件在報表內彼此對齊的方式。Align Specify how the selected objects are aligned in relation to one another within the report.

  • 設定成相同大小 :調整選取物件在報表內的大小。Make Same Size Adjust the size of the selected objects within the report.

  • 水平間距 :調整選取物件在報表內的水平間距。Horizontal Spacing Adjust the horizontal spacing between the selected objects within the report.

  • 垂直間距 :調整選取物件在報表內的垂直間距。Vertical Spacing Adjust the vertical spacing between the selected objects within the report.

  • 對齊表單中央 :讓選取物件在報表設計師視窗內垂直及水平地對齊中央。Center in Form Center the selected object vertically and horizontally in relation to the Report Designer window.

  • 順序 :將選取物件移至背景或前景。Order Move selected objects into the background or foreground.

報表功能表 Report Menu

當報表設計介面取得焦點時, [報表] 功能表就會包含下列選項:When the report design surface has focus, the Report menu contains the following options:

  • 報表屬性 :選取即可開啟 [報表屬性] 對話方塊。Report Properties Select to open the Report Properties dialog box. 在這個對話方塊中,您可以指派一般報表屬性,例如作者名稱和方格間距,以及指定報表配置的屬性,例如資料行數和頁面大小。In this dialog box, you can assign general report properties, such as author name and grid spacing, and specify properties for the report layout, such as the number of columns and page size. 您也可以包括自訂程式碼、組件和類別的參考、資料輸出元素的名稱、資料轉換和資料結構描述。You can also include custom code, references to assemblies and classes, and the names of data output elements, data transforms, and data schemas.

  • 檢視 :在兩個報表設計師索引標籤之間切換:[設計] 和 [預覽]。View Switch between the two Report Designer tabs: Design and Preview.

  • 頁首 :在報表中加入或刪除頁首。Page Header Add or delete a page header to the report. 當您刪除頁首時,就會刪除頁首中的所有項目。When you delete a page header, all items in the page header are deleted.

  • 頁尾 :在報表中加入或刪除頁尾。Page Footer Add or delete a page footer to the report. 當您刪除頁尾時,就會刪除頁尾中的所有項目。When you delete a page footer, all items in the page footer are deleted.

  • 群組窗格 :顯示或隱藏 [群組] 窗格。Grouping Pane Show or hide the Grouping pane.

檢視功能表 View Menu

您可以使用 [檢視] 功能表來顯示報表設計師視窗和工具列。Use the View menu to display Report Designer windows and toolbars

  • 錯誤清單 :使用這個選項,即可顯示發行或預覽報表時所偵測的錯誤。Error List Use this option to display errors detected when publishing or previewing a report.

  • 輸出 :使用這個選項,即可顯示發行或處理報表時所偵測的錯誤,或在報表顯示文字「#錯誤」時提供運算式錯誤的詳細資訊。Output Use this option to display errors detected when publishing or processing a report, or for more information about expression errors when a report displays the text "#Error".

  • 屬性視窗 :使用這個選項,即可顯示設計介面上目前選取之報表項目的屬性值。Properties Window Use this option to display the property values for the currently selected report item on the design surface. 若要查看巢狀報表項目的屬性,您必須按許多次報表項目,才能循環瀏覽報表項目及其巢狀成員的階層。To see properties for nested report items, you must click a report item multiple times to cycle through the hierarchy for a report item and its nested members. 您可以檢查顯示在 [屬性] 窗格頂端的項目名稱,以便查看顯示了哪一個報表項目的屬性。Check the name of the item that appears at the top of the Properties pane to see which report item's properties are displayed.

  • 工具箱 :使用這個選項,即可顯示 [工具箱]。Toolbox Use this option to display the Toolbox.

  • 其他視窗 :使用這個選項,即可顯示下列窗格:Other Windows Use this option to display the following pane:

    • 文件大綱 :使用這個選項,即可顯示報表中報表項目及其文字方塊集合的階層式檢視。Document Outline Use this option to display a hierarchical view of report items and their collections of text boxes in a report.
  • 工具列 :使用這個選項,即可顯示支援報表設計師功能的工具列,包括 [報表框線][報表格式]Toolbars Use this option to display toolbars that support Report Designer features, including Report Borders and Report Formatting. 如需詳細資訊,請參閱「 報表設計師的工具列」。For more information, see Report Designer Toolbars.

  • 報表資料 :使用這個選項,即可顯示 [報表資料] 窗格,而且您可以在其中加入報表參數、資料來源、資料集和影像。Report Data Use this option to display the Report Data pane, where you can add report parameters, data sources, datasets, images.

專案功能表 Project Menu

您可以使用 [專案] 功能表來管理專案中的共用資料來源和報表。Use the Project menu to manage shared data sources and reports in a project. 當您在專案中加入或移除項目時,就會自動更新 [方案總管] 中專案項目的階層式顯示。When you add or remove items from the project, the hierarchical display of project items in Solution Explorer is automatically updated.

  • 加入新項目 :在專案中加入新的共用資料來源或新的報表。Add New Item Add a new shared data source or new report to the project.

  • 加入現有項目 :在專案中加入現有的共用資料來源或現有的報表。Add Existing Item Add an existing shared data source or an existing report to the project.

  • 匯入報表 :從其他應用程式匯入報表,例如 Microsoft Access。Import Reports Import reports from another application, for example, Microsoft Access.

  • 從專案移除 :從專案中排除項目。Exclude from Project Exclude items from the project. 這個選項並不會從檔案系統中刪除項目。This option does not delete the item from your file system.

  • 顯示所有檔案 :顯示專案中的所有檔案。Show All Files Show all files in a project.

  • 重新整理專案工具箱項目 :當您在專案中安裝新的自訂報表項目時,重新整理工具箱快取。Refresh Project Toolbox Items Refresh the toolbox cache when you install new custom report items in your project.

  • 屬性 :開啟這個專案的 [屬性頁] 對話方塊。Properties Open the Property Pages dialog box for this project. 如需詳細資訊,請參閱 專案屬性頁對話方塊For more information, see Project Property Pages Dialog Box.

報表設計師的工具列 Report Designer Toolbars

報表設計師會提供下列可在設計報表時使用的專用工具列:Report Designer provides the following specialized toolbars to use when designing reports:

  • 報表 :加入頁首或頁尾、設定報表屬性、切換尺規或 [群組] 窗格,或使用顯示比例來變更報表的檢視。Report Add a page header or page footer, set report properties, toggle the ruler or Grouping pane, or use zoom to change your view of the report.

  • 報表框線 :設定所有選取線條的色彩、樣式和寬度,以及所有選取報表項目的框線。Report Borders Set the color, style, and width for all selected lines and the borders of all selected report items.

  • 報表格式 :設定選取報表項目的格式。Report Formatting Set the format of selected report items. 若為文字方塊,您就可以使用此工具列來變更下列格式類型:字型屬性和文字色彩、背景色彩,以及文字對齊。For text boxes, the following types of formatting can be changed using the toolbar: font properties and text color, background color, and text justification.

  • 配置 :設定資料區內報表項目和合併資料格的繪製順序。Layout Set the drawing order of report items and merging cells within a data region.

  • 標準 :開啟或儲存專案、顯示視窗,以及選取偵錯組態。Standard Open or save projects, display windows, and select the Debug configuration.

    您可以使用 [檢視] 功能表來控制是否要顯示這些工具列。Use the View menu to control whether to display these toolbars. 如果其他 Visual StudioVisual Studio 工具列的功能不適用於報表設計師功能,這些工具列的功能可能會停用。Other Visual StudioVisual Studio toolbars may be disabled if their functionality does not apply to Report Designer features.

原始檔控制 Source Control

SQL Server Data ToolsSQL Server Data Tools 可以與來源外掛程式整合。 can integrate with source plug-ins. 您可以使用 [選項] 對話方塊中的 [專案和方案] 頁面,以指定外掛程式,並設定屬性。Use the Projects and Solutions pages in the Options dialog box to specify the plug-in and configure properties.

自訂報表範本 Custom Report Templates

若要使用自訂報表做為新報表的範本,您只需將自訂報表複製到裝有 SQL Server Data ToolsSQL Server Data Tools 之電腦上的 ReportProject 資料夾即可。To use custom reports as templates for new reports, you simply copy them to the ReportProject folder on the computer on which SQL Server Data ToolsSQL Server Data Tools is installed. 根據預設,這個資料夾會位於下列位置: <drive>:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Private Assemblies\ProjectItems\ReportProjectBy default, this folder is in the following location: <drive>:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Private Assemblies\ProjectItems\ReportProject. 將新項目加入報表專案時,您的自訂報表會顯示在 [範本] 窗格中。When you add a new item to the report project, your custom report appears in the Templates pane.

您也可以將自訂樣式加入報表精靈。You can also add custom styles to the report wizard.

SQL Server 資料工具的命令列支援 Command Line Support for SQL Server Data Tools

SQL Server Data ToolsSQL Server Data Tools 是以 MicrosoftMicrosoft Visual StudioVisual Studio 以及基礎 devenv.exe 應用程式為基礎。 is based on MicrosoftMicrosoft Visual StudioVisual Studio and the underlying devenv.exe application. 您必須先為下列兩個項目設定有效的值,才能使用這些選項:Before you can use these options, you must set valid values for following two items:

  • OverwriteDataSources、TargetDataSourceFolder、TargetReportFolder 和 TargetServerURL 的專案屬性。Project properties for OverwriteDataSources, TargetDataSourceFolder, TargetReportFolder, and TargetServerURL.

  • 至少一組組態屬性,例如「偵錯」或「發行」。At least one set of configuration properties, for example, Debug or Release.

    如需詳細資訊,請參閱< Publishing Data Sources and Reports>。For more information, see Publishing Data Sources and Reports.

    針對報表伺服器專案,您可以從命令列指定下列選項:For a report server project, you can specify the following options from the command line:

  • /deploy :使用組態檔中指定的專案屬性來部署報表。/deploy Deploy reports by using the project properties specified in a configuration file. 例如,下列命令會使用專案屬性中指定的「發行」組態設定,部署方案檔 Reports.sln 所指定的報表。For example, the following command deploys the reports specified by the solution file Reports.sln by using the Release configuration settings that are specified in the project properties:

    devenv.exe "C:\Users\MyUser\Documents\Visual Studio 2015\Projects\Reports\Reports.sln" /deploy "Release"  
    
  • /build :建立但不部署方案檔。/build Build the solution file, but do not deploy it. 例如,下列命令會使用專案屬性中指定的「偵錯」組態設定,建立方案檔 Reports.sln 所指定的報表。For example, the following command builds the reports specified by the solution file Reports.sln by using the Debug configuration settings that are specified in the project properties:

    devenv.exe "C:\Users\MyUser\Documents\Visual Studio 2015\Projects\Reports\Reports.sln" /build "Debug"  
    
  • /out :將建立方案的輸出重新導向至指定檔案。/out Redirect the output generated by building a solution to the specified file. 例如,下列命令會將上一個範例中的組態輸出,重新導向到名為 mybuildlog.txt 的檔案。For example, the following command redirects the output from the build in the previous example to a file named mybuildlog.txt.

    devenv.exe "C:\Users\MyUser\Documents\Visual Studio 2015\Projects\Reports\Reports.sln" /build "Debug" /out mybuildlog.txt  
    

Reporting Services 中的鍵盤快速鍵 Keyboard Shortcuts in Reporting Services

您可以使用鍵盤快速鍵以:Use keyboard shortcuts to:

  • 控制 SQL Server Data ToolsSQL Server Data Tools中的視窗和模式:Control windows and modes in SQL Server Data ToolsSQL Server Data Tools:

    說明Description 按鍵組合Key Combination
    建立選取的專案Build the selected project CTRL+SHIFT+BCTRL+SHIFT+B
    顯示 [屬性] 視窗Display Properties window F4F4
    顯示資料視窗Display Data window CTRL+Alt+DCTRL+Alt+D
    開始偵錯Start debugging F5F5
    從某個開啟的視窗移至下一個Move from one open window to the next F6F6
  • 控制報表設計介面上的項目:Control items on the report design surface:

    說明Description 按鍵組合Key Combination
    將焦點從某個報表項目移到下一個報表項目Move focus from one report item to the next report item TABTAB
    移動選取的報表項目Move selected report item 方向鍵Arrow keys
    微調選取的報表項目Nudge selected report item CTRL+方向鍵CTRL+Arrow keys
    增加或減少選定報表項目的大小Increase or decrease the size of the selected report item CTRL+SHIFT+方向鍵CTRL+SHIFT+Arrow keys
    在文字方塊中,將游標移到可見之顯示文字的開頭In a text box, move cursor to the beginning of the display text that is visible CTRL+HOMECTRL+HOME
    在文字方塊中,將游標移到可見之顯示文字的結尾In a text box, move cursor to the end of the display text that is visible CTRL+ENDCTRL+END
    在文字方塊中,選取從目前游標位置到可見之顯示文字開頭的文字In a text box, select text from the current cursor position to the beginning of the display text that is visible SHIFT+HOMESHIFT+HOME
    在文字方塊中,選取從目前游標位置到可見之顯示文字結尾的文字In a text box, select text from the current cursor position to the end of the display text that is visible SHIFT+ENDSHIFT+END
    在文字方塊中,選取從目前游標位置到運算式開頭的文字In a text box, select text from the current cursor position to the beginning of the expression CTRL+SHIFT+HOMECTRL+SHIFT+HOME
    在文字方塊中,選取從目前游標位置到運算式結尾的文字In a text box, select text from the current cursor position to the end of the expression CTRL+SHIFT+ENDCTRL+SHIFT+END
    開啟選定報表項目的快速鍵功能表Open the shortcut menu for the selected report item 較新鍵盤上的 SHIFT+F10+屬性鍵SHIFT+F10+Property Key on newer keyboards

後續的步驟Next steps

下載 SQL Server Data Tools 方案總管 Download SQL Server Data Tools Solution Explorer
Reporting Services 報表 Reporting Services Reports
報表定義語言 Report Definition Language
SQL Server 資料工具中的部署和版本支援Deployment and Version Support in SQL Server Data Tools

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