SSRS - Hide Duplicate Rows

Brett Ossman 51 Reputation points
2022-04-12T19:23:43.65+00:00

I've tried SSRS HideDuplicates and an approach which compares a data field with the previous row's value. Either one leaves me with empty rows, where the duplicates would have been.

How do I remove duplicate rows and prevent empty rows?

Changing the existing stored procedure to SELECT DISTINCT or creating a new stored procedure is not an option.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. Joyzhao-MSFT 15,631 Reputation points
    2022-04-13T02:01:25.277+00:00

    Hi @Brett Ossman ,
    Please try to set the "Visibility" property by using the following expression:

    =IIF(fields!fieldname.Value=Previous(Fields!fieldname.value),True,False)  
    

    If the expression is based on Row Group Properties, whitespace caused by hiding duplicate rows will be removed.

    See the following sample below about the "Row Growps" properties.

    1) Right button on the Row Groups.

    2) Click in Visibility

    3) Click in Expression and type the following code: =IIF(fields!fieldname.Value=Previous(Fields!fieldname.value),True,False)

    192496-image.png

    For more inforamtion, please see: SSRS Reports Hide Duplicate Records and White Spaces.
    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Isabellaz-1451 3,616 Reputation points
    2022-04-13T01:48:46.143+00:00

    Hi @Brett Ossman

    You can try another method , by group on the Details row .

    192513-image.png

    192505-image.png

    192522-image.png

    Best Regards,
    Isabella


    If the answer is the right solution, please click "Accept Answer" and upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.