在报表查看器的行中显示唯一数据

时间:2012-04-26 09:03:52

标签: c# asp.net report-viewer2010

首先请原谅我的英文,我想用报告查看器asp.net 2010显示报告,     将数据绑定到报告查看器&显示报告数据它工作得很好,但隐藏组中的重复数据不起作用,&我右键单击文本框& F4设置隐藏重复项与组名。它只会隐藏连续重复行数据

 for example 
    Data in the column is 
    <br />Employee
    <br />Employee
    <br />Employee
    <br />Employee
    means it'll show only one time. if it is like 
    <br />Employee
    <br />Department
    <br />College
    <br />Employee
    <br />Department
    <br />College
    means it'll display same format as above.
    & here also i need get unique data in the group.
<br>
Why am asking this means i can't apply distinct in query because it is Many to many relationship query, for that i need to get uniqueness in report only please help me thanks in advance.

2 个答案:

答案 0 :(得分:0)

我建议您从查询中进行优化,而不是在报表查看器中进行优化。当我们考虑查询时,您可以使用'GROUP BY'而不是使用'DISTINCT'来删除重复项。希望这会有所帮助。

答案 1 :(得分:0)

最近我不得不做这件事。 rdlc有一个叫做行组的东西。我相信这就是你要做的事。