在Rdlc报告中,如何将分组设置为文本框以及Tablix [英] In Rdlc Report, how to set the Grouping to the Text Box along with the Tablix

查看:154
本文介绍了在Rdlc报告中,如何将分组设置为文本框以及Tablix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mine是一个单页的RDLC报告,包含页眉,正文和页脚。我的身体有一个Tablix,在数据集中有一个属性,我已经将组设置为Tablix中的行,并在分页选项中选中了在组的每个实例之间选项,以及我有一个文本框,表达数据集中的值。



例如:员工报告及其个人详细信息(姓名,DOB,SEX,经验,薪水)文本框中的Tablix和EmployeeID。



现在在数据集中,我们有5名员工的记录。报告的结果是5页报告,包含页眉,正文和页脚,每页的正文中Tabix重复打印所有5个记录,但是带有员工ID的文本框(位于Tablix之上) )仅在第一页打印一次。我还需要在所有页面中使用员工ID打印文本框。



RDLC报告中此场景的绝对分辨率是多少?



我在Visual Studio 2012 MVC4中开发了这个要求。

Mine is a single page RDLC report with Header, Body and footer. I the body there is one Tablix with grouping w.r.t a property in the dataset and I have set the group to the rows in the Tablix and have checked the option "Between each instance of a group" in Page Break Options, along with this I have a text box with an expression of a value in the dataset.

Ex: An employee report with his personal details(Name, DOB, SEX, Experience, Salary) in the Tablix and EmployeeID in the Text box.

Now in the Dataset we have records of 5 employees. The outcome of the report is 5 pages of report with Header, Body and footer and in the body of each page the Tabix is repeated printing all the 5 records one after the other, but the Text Box with Employee ID (which is above the Tablix)is printed only once in the first page. I require Text Box also to be printed with the Employee ID in all the Pages.

What would be the absolute resolution for this scenario in the RDLC Report?

I have developed this requirement in my Visual Studio 2012 MVC4.

推荐答案





如果有人还在寻找答案。这就是我的工作方式。



在Tablix中的EmployeeID上添加分组。为文本框指定一个不同的名称,其值为EmployeeIDGroup(txt_EmployeeID)



现在在标题文本框中添加以下表达式:



=第一个(ReportItems!txt_EmployeeID.Value)



现在,如果您不想在Tablix中显示EmployeeID。选择列,然后在属性中将Hidden属性更改为True。



现在,每当Tablix中EmployeeID的值发生变化时,它将更改文本框的值标题也是。
Hi,

If somebody is still looking for the answer. This is how it works for me.

Add the Grouping on the EmployeeID in the Tablix. Give a different name to the textbox with the value of EmployeeIDGroup (txt_EmployeeID)

Now in the header text box add the following expression:

=First(ReportItems!txt_EmployeeID.Value)

Now if you do not want to show the EmployeeID in the Tablix. Select the column and in the properties change the Hidden property to True.

Now, whenever value of the EmployeeID in Tablix will change it will change the value of the textbox in the header also.


这篇关于在Rdlc报告中,如何将分组设置为文本框以及Tablix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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