Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Hide duplicate row SSRS 2008

Let's say you have a SQL table with 2 columns. The first column is a name and the second column is a street address. For every address a name has, the name column is repeated for every row as such:

name          address
John Doe    100 West Main Street
John Doe    200 Apple Road
John Doe    300 Orange Circle
Todd Toe     123 Maple Drive
Todd Toe     543 Ridge Road

Now you wish to build a report to display this data, but you don't feel like grouping the name column in your SQL nor do you want to group the name column in your report.

So, in the tablix of your report, you create two rows. The first row displays the name column and the second row display an associated address. The problem is that you don't want to repeat the name row for each address like this:

John Doe                                                                                          
100 West Main Street
John Doe                                                                                          
200 Apple Road
John Doe                                                                                          
300 Orange Circle
Todd Toe                                                                                          
123 Maple Drive
Todd Toe                                                                                          
543 Ridge Road

You want it to look this:

John Doe                                                                                          
100 West Main Street
200 Apple Road
300 Orange Circle
Todd Toe                                                                                          
123 Maple Drive
543 Ridge Road

You can do this (without any grouping) by simply using the Previous expression of SSRS.

1) Right Click on your name row and choose row visibility.
2) Click the 'Show or hide based on an expression' radio button and click the expression button.
3) Enter the expression:
    =iif(Fields!name.Value = Previous(Fields!name.Value), True, False)

That's it!

 

Leave a Reply