如何以显示列组表头的顶部而不是在RDLC左 [英] How to show group by columns on top of the table header instead of on the left in rdlc

查看:846
本文介绍了如何以显示列组表头的顶部而不是在RDLC左的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有柱的empType(全职/兼职等),EmpLocation(雷蒙德/ Seatle /华盛顿等),EmpBand的报告(S / T / E等),EMPID,EmpName,EmpFullAddress,EmpContactNo,EmpSal,EmpGender ,EmpDob。



我们需要GROUP BY列的empType,EmpLocation,EmpBand数据,然后显示的列数据的其余部分。



我可以在RDLC报告功能,通过的empType使用组第一组再由EmpLocation为儿童和EmpBand作为子组EmpLocation,但是这三个值出现在左边一棵树。



但我要的是这三个字段出现在每个表为
类似数据表而不是树的头顶部头顶部左侧



这有可能给他们看像下面?






的empType:全职EmpLocation:Seatle EmpBand:•



EMPID | EMP名称| EmpFullAddress | EmpContactNo | EmpSal | EmpGender | EmpDob结果
100克里斯40 Drealand AVE 7417894561 74000中号15/4/1985






的empType:全职EmpLocation:Seatle EmpBand:T已



EMPID | EMP名称| EmpFullAddress | EmpContactNo | EmpSal | EmpGender | EmpDob结果
100克里斯40 Drealand AVE 7417894561 74000中号15/4/1985






的empType:全职EmpLocation:雷蒙德EmpBand:•



EMPID | EMP名称| EmpFullAddress | EmpContactNo | EmpSal | EmpGender | EmpDob结果
100克里斯40 Drealand AVE 7417894561 74000中号15/4/1985






的empType:全职EmpLocation:Seatle EmpBand:•



EMPID | EMP名称| EmpFullAddress | EmpContactNo | EmpSal | EmpGender | EmpDob结果
100克里斯40 Drealand AVE 7417894561 74000中号15/4/1985






的empType:兼职EmpLocation:Seatle EmpBand:•



EMPID | EMP名称| EmpFullAddress | EmpContactNo | EmpSal | EmpGender | EmpDob结果
100克里斯40 Drealand AVE 7417894561 74000中号15/4/1985





解决方案

是的,这绝对是可能的。但是,你不希望它在这三个列组层次结构(至少,因为我设想它似乎并不正确)。



你真正想要做的是三个变量的组合组(见下图)。或者,您可以创建一个上创建一个字符串来组一个表达式:

  =字段Field1.Value&安培;  - 与& !领域Field2.Value&安培;  - 与&领域!Field3.Value 



你这样做无论哪种方式,你将要设置的排序放组按所需顺序



还应当注意的是,无论何时添加的父行组中,加入一列。您可以删除已添加的列,出现提示时,选择删除列仅。这将使该集团在其位置在层次结构,但除去额外的列



一旦做到这一点,你可以做以下,以达到您想要的结果:




  1. 在您的详细信息行右键单击并选择插入行=>外部组 - 以上。移动你的行头,以这个新创建的行刚创建的行


  2. 右键单击并选择插入行=>组内。 - 以上


  3. 合并的所有单元格在步骤2中创建的行


  4. 占位符加入的行中,在步骤2中创建的单细胞设置表达为占位符以创建所需的组标题



    =的empType:与& !领域EmpType.Value&安培; EmpLocation:与& !领域EmpLocation.Value&安培; EmpBand:与&领域!EmpBand.Value




瞧!你应该有你想要的结果。如果您有任何疑问或问题,发表评论,我会尽我所能来帮助





根据注释其他详情



你能重复标题中的新页面上时的Tablix跨页?明确地。要做到这一点,进入高级模式查看行详细信息。点击在对应于你的Tablix包含标题行高级模式的行





根据Tablix属性,变化保持与集团以后在报头的情况下,改变为True新建页面的重复。





您可以显示工资为整个集团的总和?是的你可以。你想一个新行添加到底层,总结默认范围所需的字段。




  1. 右键单击您的详细信息行,并选择插入行=>外集团 - 的


  2. 创建使用下面的表达式您此行总计:<。 / p>

    = SUM(字段!Salary.Value)




请注意,我没有指定范围或数据集的总和。只要expression在一组中(无论是细节组或其他方式),如果没有提供范围/数据集,将默认为当前范围。这应该给你你想要的总量。



当你说:如果我想与它的头只有表EmpBand的S不同的值相同的组头下,重复/ T / E,我能做到吗?,我没有明白你的意思。



编程快乐!


I have a report with columns EmpType(Full Time/Part Time etc),EmpLocation(Redmond/Seatle/Washington etc),EmpBand(S/T/E etc),EmpId,EmpName,EmpFullAddress,EmpContactNo,EmpSal,EmpGender,EmpDob.

We need to group the data by columns EmpType,EmpLocation,EmpBand and then display rest of the columns as data.

I could use the group by feature of the rdlc report to first group by EmpType then by EmpLocation as its child and EmpBand as child group of EmpLocation but these three values appear on the left as a tree.

But what I want is those three fields to appear on top of every table as something like header on top of header of data table instead of tree on left.

Is that possible to show them like below?


EmpType: Full Time EmpLocation: Seatle EmpBand: S

EmpId | Emp Name | EmpFullAddress | EmpContactNo | EmpSal |EmpGender |EmpDob
100 Kris 40 Drealand ave 7417894561 74000 M 15/4/1985


EmpType: Full Time EmpLocation: Seatle EmpBand: T

EmpId | Emp Name | EmpFullAddress | EmpContactNo | EmpSal |EmpGender |EmpDob
100 Kris 40 Drealand ave 7417894561 74000 M 15/4/1985


EmpType: Full Time EmpLocation: Redmond EmpBand: S

EmpId | Emp Name | EmpFullAddress | EmpContactNo | EmpSal |EmpGender |EmpDob
100 Kris 40 Drealand ave 7417894561 74000 M 15/4/1985


EmpType: Full Time EmpLocation: Seatle EmpBand: S

EmpId | Emp Name | EmpFullAddress | EmpContactNo | EmpSal |EmpGender |EmpDob
100 Kris 40 Drealand ave 7417894561 74000 M 15/4/1985


EmpType: Part Time EmpLocation: Seatle EmpBand: S

EmpId | Emp Name | EmpFullAddress | EmpContactNo | EmpSal |EmpGender |EmpDob
100 Kris 40 Drealand ave 7417894561 74000 M 15/4/1985


解决方案

Yes, this is definitely possible. However, you do not want it to group on these three columns in a hierarchy (at least, as I'm conceiving of it that doesn't seem right).

What you actually want to do is group on the combination of the three variables (see screenshot below). Alternatively, you could create a single expression which creates a string to group on:

=Fields!Field1.Value & "-" & Fields!Field2.Value & "-" & Fields!Field3.Value

Either way you do it, you will want to set the sorting to put the groups in the desired order.

It should also be noted that whenever you add a parent row group, a column is added. You can delete the column that was added and, when prompted, select "Delete Columns Only". This will leave the group in its place in the hierarchy but remove the extra column.

Once that is done, you can do the following to achieve your desired result:

  1. Right-click on your Detail Row and choose Insert Row => Outside Group - Above. Move your row headers to this newly created row.

  2. Right-click on the row you just created and choose Insert Row => Inside Group - Above.

  3. Merge all the cells in the row created in step 2.

  4. Add a placeholder to the single cell in the row created in step 2. Set the expression for the placeholder to create the desired group header:

    ="EmpType: " & Fields!EmpType.Value & " EmpLocation: " & Fields!EmpLocation.Value & " EmpBand: " & Fields!EmpBand.Value

Voila! You should have your desired result. If you have questions or issues, leave a comment and I'll do my best to help.

Additional Details based on Comment

Can you repeat the header on a new page when a tablix spans pages? Most definitely. To do this, access the advanced mode to view the row details. Click on the row in the advanced mode that corresponds to the row in your tablix that contains the header.

Under the tablix properties, change Keep with Group to "After" in the case of a header and change the Repeat on New Page to True.

Can you show the sum of Salaries for the entire group? Yes, you can. You want to add a new row to the bottom and sum the desired field for the default scope.

  1. Right-click on your Detail Row and choose Insert Row => Outside Group - Below.

  2. Create your totals in this row using the following expression:

    =SUM(Fields!Salary.Value)

Notice that I did not specify a scope or dataset with the aggregate. So long as the expression lies inside a group (be it a detail group or otherwise), if no scope/dataset is provided, it will default to the current scope. This should give you the totals you desire.

When you say "if I want only the table with its header to repeat under the same group header for different values of EmpBand S/T/E, can I do that ?", I have not idea what you mean.

Happy coding!

这篇关于如何以显示列组表头的顶部而不是在RDLC左的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆