Some times while working on SSRS reports there are some duplicate records issue occurs.
Like you can see this in the below image.
Now to remove the duplicate records just right click the table and than select properties and than set the hidden property to:
=Fields!ActivityNumber.Value = Previous(Fields!ActivityNumber.value)
AS you can see the property in the below image:
Now after setting this property the data on the report looks like this:
In the above image the duplicate record is hidden but the issue is that there are some white spaces left between the rows.
Two resolve this issue we have to remove the expression from the hidden property of the table.
And than select the row and than right click select row group and than select the group properties as you can see this in the below image
After selecting the group properties now select select visibility and than add the expression that we have added above in the hidden property i.e
=Fields!ActivityNumber.Value = Previous(Fields!ActivityNumber.value)
As you can see this in the below image.
Now after doing that the duplicate records will be remove and also the white spaces between the rows will be remove as you can see that in the below image.
The above example that I have given is related to hiding row based on single column.If you want to hide the records based on two or more columns that you can use the below expression.
=(Fields!Voucher.Value = Previous(Fields!Voucher.Value)) And (Fields!AccountNum.Value = Previous(Fields!AccountNum.Value))
The above expression means that if the voucher and the AccountNum both are repeating than report short hide the row.
This was all related to the duplicate records and white spaces.
Below are some more links related to this.
http://glutenfreesql.wordpress.com/2012/10/02/ssrs-hide-duplicates/
http://stackoverflow.com/questions/11562043/trying-to-get-rid-of-white-space-in-ssrs-report
http://dba.stackexchange.com/questions/53727/how-to-hide-rows-in-ssrs-report
If you have any questions related to that than feel free to comment on this.
Thanks
Muhammad Zahid.
Like you can see this in the below image.
Now to remove the duplicate records just right click the table and than select properties and than set the hidden property to:
=Fields!ActivityNumber.Value = Previous(Fields!ActivityNumber.value)
AS you can see the property in the below image:
Now after setting this property the data on the report looks like this:
In the above image the duplicate record is hidden but the issue is that there are some white spaces left between the rows.
Two resolve this issue we have to remove the expression from the hidden property of the table.
And than select the row and than right click select row group and than select the group properties as you can see this in the below image
After selecting the group properties now select select visibility and than add the expression that we have added above in the hidden property i.e
=Fields!ActivityNumber.Value = Previous(Fields!ActivityNumber.value)
As you can see this in the below image.
Now after doing that the duplicate records will be remove and also the white spaces between the rows will be remove as you can see that in the below image.
The above example that I have given is related to hiding row based on single column.If you want to hide the records based on two or more columns that you can use the below expression.
=(Fields!Voucher.Value = Previous(Fields!Voucher.Value)) And (Fields!AccountNum.Value = Previous(Fields!AccountNum.Value))
The above expression means that if the voucher and the AccountNum both are repeating than report short hide the row.
This was all related to the duplicate records and white spaces.
Below are some more links related to this.
http://glutenfreesql.wordpress.com/2012/10/02/ssrs-hide-duplicates/
http://stackoverflow.com/questions/11562043/trying-to-get-rid-of-white-space-in-ssrs-report
http://dba.stackexchange.com/questions/53727/how-to-hide-rows-in-ssrs-report
If you have any questions related to that than feel free to comment on this.
Thanks
Muhammad Zahid.
No one can lie, no one can hide anything, when he looks directly into someone's eyes. See the link below for more info.
ReplyDelete#hide
www.ufgop.org