简体   繁体   English

具有两个数据集的SSRS分组

[英]SSRS Grouping With Two DataSets

I have a table Project. 我有一个表项目。

  ProjID  Proj_task
   1       NIT 2.0  
   2       SSRS

I have table called Project_Task. 我有一个名为Project_Task的表。

  ProjID  Task_DS   User
   1       task1      User1
   1       task2      User2
   1       task3      User3
   2       task4      User4
   2       task5      User5
   2       task6      User6

I want to generate Report in Below format. 我想生成以下格式的报告。 (Each project ID inforamtion should be in one Page for which i am using Insert Group ) (每个项目ID信息应在我正在使用“插入组”的一页中)

In Page 1: 在第1页中:

 ProjID  : 1
 Proj_task: NIT 2.0 
 --------------------
       User       Task_DS
      User1    task1
      User2    task2
      User3    task3

In Page 2: 在第2页中:

 ProjID  : 2
 Proj_task: SSRS    
 --------------------
       User       Task_DS
      User4    task4
      User5    task5
      User6    task6

I have many tables with project Information to be displayed in SSRS. 我有很多带有项目信息的表要显示在SSRS中。 If i make single data set using join and using it in Sinle table in SSRS, i do get duplicate records in few scenario. 如果我使用连接并在SSRS的Sinle表中使用它来制作单个数据集,那么在少数情况下,我确实会得到重复的记录。 So i thought of creating multiple datasets and mapping it to different tables (eg: Proj info in One table, Task Information in another Table ..etc) and make Grouping in SSRS.. 所以我想创建多个数据集并将其映射到不同的表(例如:一个表中的项目信息,另一个表中的任务信息..etc),然后在SSRS中进行分组。

I want to know if that is possible in SSRS. 我想知道在SSRS中是否有可能。 If so please guide me to do that. 如果是这样,请指导我这样做。

If this is the only table you want to show, then make a single dataset: 如果这是您要显示的唯一表,则制作一个数据集:

SELECT 
    ProjID
    , Proj_task
    , task_DS
    , User 
FROM 
    Project p 
    JOIN Project_Task pt ON p.ProjID = pt.ProjID

Then, make a table with a group in SSRS, and in the group choose grouping on ProjID and Proj_task. 然后,在SSRS中创建一个带有组的表,然后在组中选择ProjID和Proj_task上的分组。 After that check page break Between each instance of a group in Page Breaks pane. 之后,在分页符窗格中的组的每个实例之间检查分页符。

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

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