简体   繁体   English

SSRS-多个组以显示数据

[英]SSRS - Multiple Groups to display data

We have a SharePoint List with following columns: 我们有一个SharePoint列表,其中包含以下列:

 Dep User Start Date End Date Status D1 U1 03/08/2015 09/08/2015 RED D1 U1 10/08/2015 16/08/2015 GREEN D1 U1 17/08/2015 23/08/2015 YELLOW D1 U1 24/08/2015 30/08/2015 BLUE D1 U2 03/08/2015 09/08/2015 GREEN D1 U2 10/08/2015 16/08/2015 GREEN D1 U2 24/08/2015 30/08/2015 RED D2 U3 03/08/2015 09/08/2015 YELLOW D2 U3 24/08/2015 30/08/2015 YELLOW D2 U4 17/08/2015 23/08/2015 BLUE D2 U4 24/08/2015 30/08/2015 RED D3 U5 10/08/2015 16/08/2015 YELLOW D3 U6 03/08/2015 09/08/2015 BLUE D3 U6 10/08/2015 16/08/2015 RED D3 U6 17/08/2015 23/08/2015 BLUE D3 U6 24/08/2015 30/08/2015 GREEN 

We want to create report in following format: 我们要以以下格式创建报告:

 Dep User Week 1 Week 2 Week 3 Week 4 D1 U1 RED GREEN YELLOW BLUE U2 GREEN GREEN RED D2 U3 YELLOW YELLOW U4 BLUE RED D3 D3 U5 YELLOW U6 BLUE RED BLUE GREEN 

What we have come up till now is: 到目前为止,我们得出的是:

 Departments User 8/3/2015 8/10/2015 8/17/2015 8/24/2015 D1 U10 GREEN RED U12 RED YELLOW BLUE GREEN U13 RED YELLOW 

Any idea to bring all status in one row? 有什么想法可以将所有状态排成一排吗?

You need to use a Matrix, with two row groups. 您需要使用具有两个行组的矩阵。

  1. Create the matrix, and set the row to be the Dep field. 创建矩阵,并将行设置为Dep字段。

  2. Right click the row and select Add Group -> Child Group . 右键单击该行,然后选择Add Group -> Child Group Set this child group to be the User Name 将此子组设置为用户名

  3. Set the column headers to be the Start dates 将列标题设置为开始日期

  4. Finally set the Data to be the status. 最后将数据设置为状态。

The final matrix should look as follows 最终矩阵应如下所示

在此处输入图片说明

And will give this result when run 并在运行时给出此结果

在此处输入图片说明

I'm sure once you get to this stage you will be able to do some tinkering to label the columns as you want them, or format it differently when required. 我敢肯定,一旦进入这一阶段,您将能够进行一些修补,以根据需要标记列,或者在需要时以其他方式设置其格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM