创建基本表报表(SSRS 教程)Create a Basic Table Report (SSRS Tutorial)

在本教程中,将使用 Visual Studio / SQL Server Data Tools (SSDT) 中的报表设计器 工具。In this tutorial, you use the Report Designer tool in Visual Studio / SQL Server Data Tools (SSDT). 你将创建 SQL Server Reporting Services (SSRS) 分页报表。You create a SQL Server Reporting Services (SSRS) paginated report. 报表包含通过 AdventureWorks2016 数据库的数据创建的查询表。The report contains a query table, created from data in the AdventureWorks2016 database.

在本教程中,你将学习如何:As you progress in this tutorial, you're going to learn how to:

  • 创建报表项目。create a report project.
  • 设置数据连接。set up a data connection.
  • 定义查询。define a query.
  • 添加表数据区域。add a table data region.
  • 设置报表格式。format the report.
  • 组和总计字段。group and total fields.
  • 预览报表。preview the report.
  • 根据需要发布报表。optionally publish the report.

要求Requirements

若要使用本教程,系统中必须安装下列组件:Your system must have the following components installed to take this tutorial:

  • MicrosoftMicrosoft SQL Server 数据库引擎。SQL Server database engine.
  • SQL Server 2016 Reporting Services 或更高版本 (SSRS)。SQL Server 2016 Reporting Services or later (SSRS).
  • AdventureWorks2016 数据库。The AdventureWorks2016 database. 有关详细信息,请参阅 AdventureWorks 示例数据库For more information, see Adventure Works Sample Databases.
  • 适用于 Visual Studio 的 SQL Server Data Tools 和 Reporting Services 扩展一同安装,以便访问报表设计器 。SQL Server Data Tools for Visual Studio along with the Reporting Services extension installed to enable access to the Report Designer.

还必须具有从 AdventureWorks2016 数据库检索数据的只读权限。You must also have read-only permissions to retrieve data from the AdventureWorks2016 database.

学完本教程的估计时间: 30 分钟。Estimated time to complete the tutorial: 30 minutes.

后续步骤Next steps

第 1 课:创建报表服务器项目 (Reporting Services)Lesson 1: Creating a Report Server Project (Reporting Services)

第 2 课:指定连接信息 (Reporting Services)Lesson 2: Specifying Connection Information (Reporting Services)

第 3 课:为表报表定义数据集 (Reporting Services)。Lesson 3: Defining a Dataset for the Table Report (Reporting Services)

第 4 课:向报表添加表 (Reporting Services)。Lesson 4: Adding a Table to the Report (Reporting Services)

第 5 课:设置报表格式 (Reporting Services)。Lesson 5: Formatting a Report (Reporting Services)

第 6 课:添加分组和总计 (Reporting Services)Lesson 6: Adding Grouping and Totals (Reporting Services)

另请参阅See also

Reporting Services 教程更多问题?Reporting Services Tutorials More questions? 请访问 Reporting Services 论坛Try asking the Reporting Services forum