Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SSRS Highlight Dulpicates

Posted on 2010-08-31
3
Medium Priority
?
1,278 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 1000 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 1000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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