Introduction to [SSRs] (iii) -- Define a dataset for a report

Source: Internet
Author: User

Through the first two documents [SSRs] entry (1) -- create an SSRs project and [SSRs] entry (2) -- after creating a data source,

We have created an SSRs project and obtained the data source. The next step is to know what data is to be displayed in the report. This step can be achieved by creating a dataset.

1. Solution Explorer-> right-click shared dataset-> Add new dataset:

2. In the shared dataset Properties window, enter the dataset name adventureworksdataset. Select adventureworks2012 created before the data source. Query type: text. In the query file box, enter:

Select soh. orderdate as [date],
Soh. salesordernumber as [order],
PPS. Name as subcat,
Pp. Name as product,
Sum (SD. orderqty) as qty,
Sum (SD. linetotal) as linetotal
From sales. SALESPERSON sp
Inner join sales. salesorderheader as Soh on sp. businessentityid = soh. salespersonid
Inner join sales. salesorderdetail as SD on SD. salesorderid = soh. salesorderid
Inner join production. Product as PP on SD. productid = pp. productid
Inner join production. productsubcategory as PPS on pp. productsubcategoryid = PPS. productsubcategoryid
Inner join production. productcategory as PPC on PPC. productcategoryid = PPS. productcategoryid
Group by PPC. Name,
Soh. orderdate,
Soh. salesordernumber,
PPS. Name,
Pp. Name,
Soh. salespersonid
Having PPC. Name = 'cloth'

 

PS: You can use the "query designer" to select a table for design:

You can also write SQL query statements in SSMs (this method is preferred ):

3. Database: adventureworksdataset is created.

 

Next section describes how to display table data to a report. Original article from: [http://msdn.microsoft.com/zh-cn/library/ms170625.aspx]

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.