Solved

Identify Duplicate Values in SSRS

Posted on 2012-04-02
2
2,096 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
ID: 37799517
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
ID: 37799945
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VS/SSRS - Rectangle re-sizing when element hidden 2 78
SSRS 2008 using rectangles with text boxes 6 61
SSRS expression Issue finding a string 10 66
SSRS Calculation help 6 37
This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 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

12 Experts available now in Live!

Get 1:1 Help Now