Solved

SSRS Highlight Dulpicates

Posted on 2010-08-31
3
1,276 Views
Last Modified: 2012-05-10
I need to show or highlight duplicate telephone numbers in my report.

I've tried doing i tin the sql script but the results are ot correct.
0
Comment
Question by:aneilg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
itcouple earned 250 total points
ID: 33568418
Hi

Identifying them in your dataset might be the easiest option. IsDuplicate (true/false). What was the issue with your SQL?

You can usually do self-join for this kind of tasks. This works fine based on Microsoft Adventure works database... a lot of duplicated phone numbers in their db :)
SELECT     C1.CustomerKey, C1.Phone, CASE COUNT(C2.Phone) WHEN 1 THEN 0 ELSE 1 END AS IsDuplicated
FROM         DimCustomer AS C1 INNER JOIN
                      DimCustomer AS C2 ON C1.Phone = C2.Phone
GROUP BY C1.CustomerKey, C1.Phone

Let me know if that helps in your case

Regards
Emil
0
 
LVL 9

Assisted Solution

by:sureshbabukrish
sureshbabukrish earned 250 total points
ID: 33574942
if the dataset is sorted by telephone numbers in the report,you can use [previous] function in expression to determine whether the phone number is a duplicate of the previous one and then you can highlight it.

if it is not sorted, then you need to create a function which accepts the phone number as a parameter and tells you whether it is duplicated or not. you can use the function in your select query
0
 

Author Comment

by:aneilg
ID: 33580736
Thanks for your help guys.

I've had a look at both solutions and they are both good.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 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