Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Identify Duplicate Values in SSRS

Posted on 2012-04-02
2
Medium Priority
?
2,384 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 1000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses

876 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