Solved

Identify Duplicate Values in SSRS

Posted on 2012-04-02
2
2,064 Views
Last Modified: 2012-08-14
How do I identify on an SSRS report duplicate values in a column.  For example I have a list of names and want to highlight in red the names that are the same.  Is there some sort of comparison operation that I need to use?  Please advise.
0
Comment
Question by:Gary Harper
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 250 total points
Comment Utility
If your data sorted on the column that contains the duplicates, you could use the Previous() function to refer to the previous row:

=Previous(Fields!YourColumn.Value)

See also: http://msdn.microsoft.com/en-us/library/ms156372(v=sql.100).aspx

In case you need to know where to use that function, have a look at the Color property (Font) or the BackgroundColor property of the textbox, depending on what you need.
0
 
LVL 22

Expert Comment

by:Nico Bontenbal
Comment Utility
If the table is not sorted your might be able to change your query in such a way that it has a "IsDuplicate" column, and use that field in your expression.
Another option might be to write your own code to find the duplicates, but I think that's more complicated than changing your query.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now