如何创建SQL Server报告服务(SSRS)报告

SQL Server Reporting Services (SSRS) is part of Microsoft SQL Server services since version 2000. If you are an ordinary user with a basic knowledge of SQL, this article will help you in creating your first SSRS report.

自2000版以来,SQL Server Reporting Services(SSRS)是Microsoft SQL Server服务的一部分。如果您是具有SQL基本知识的普通用户,则本文将帮助您创建第一个SSRS报告。

创建SSRS报告的要求 (Requirements for creating a SSRS report)

Before you begin using SSRS and creating reports you must have:

在开始使用SSRS和创建报告之前,您必须具有:

创建报告服务器项目 (Create a report server project)

The first thing to do is to create a report server project because we will need this later for saving report definition files and any other files that you need for creating SSRS reports.

要做的第一件事是创建报告服务器项目,因为稍后我们将需要它来保存报告定义文件以及创建SSRS报告所需的任何其他文件。

  • SQL Server Data Tools. Click on the SQL Server数据工具 。 单击File menu, find 文件菜单,找到New and then 新建 ,然后找到Project.项目
  • Business Intelligence. Business Intelligence
  • Reporting Services and then Reporting Services ,然后单击Report Server Project. Report Server Project
  • Report test in 名称”中键入Name “报告测试”
  • OK to finish. 确定”完成。



创建一个新的报告定义文件 (Create a new report definition file)

  • Solution Explorer, and then right-click on the 解决方案资源管理器” ,然后右键单击“ Reports folder. In the 报告”文件夹。 在“ Add section click 添加”部分中,单击“ New Item. 新建项目”
  • Add New Item, click 添加新项 ”窗口中,单击Report. “报告”
  • Design view you define your report layout, and in the 设计视图中,您可以定义报告布局,在Preview view you can run your report. 预览视图中,您可以运行报告。

定义数据源和数据集 (Defining data source and dataset)

Setting up a connection

建立连接

In order to retrieve data from a database or from some other resource, you will need to define the data source. In the following section, you will see how you can define the data source. We will use AdventureWorks2012 database as an example.

为了从数据库或其他资源中检索数据,您将需要定义数据源。 在下一节中,您将看到如何定义数据源。 我们将以AdventureWorks2012数据库为例。

  • View menu find and click Report Data, then 查看”菜单中,找到并单击“报告数据”,然后单击“ New and after that 新建 ”,然后单击该Data Source数据源。
  • Type AdventureWorks2012 in the field Name
  • 名称字段中输入AdventureWorks2012
  • Embedded connection 嵌入式连接
  • Microsoft SQL Server Microsoft SQL Server
  • Connection string field type: 连接字符串”字段中,输入:




  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值