Solved

How can I identify all non distinct values in a SSRS report?

Posted on 2009-05-12
4
436 Views
Last Modified: 2012-06-22
I am trying to identify all non distinct customer id's in a SSRS report by changing the back ground color. The code below only identifies the 1st non unique customer number the first time it is repeated.
=iif(CountDistinct (Fields!custid.Value) <>1,"transparent","RED")

Open in new window

0
Comment
Question by:LP_Tech
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Hwkranger
ID: 24368547
Check the scope of what you're doing.  Are the customers in the same scope that you're doing the count distinct in?
0
 

Author Comment

by:LP_Tech
ID: 24368627
There are two row groups. Is this part of the problem?
0
 
LVL 26

Accepted Solution

by:
Chris Luttrell earned 500 total points
ID: 24371876
CountDistinct is going to Count the Distinct values of All your custid values in the default scope you are in, inner most grouping.  See technet article for how it works, http://technet.microsoft.com/en-us/library/ms155923.aspx.  If you are grouping by custid then this will work as you can use that grouping scope to do the count, but it will not work in just a normal list or table without the group.
0
 

Author Comment

by:LP_Tech
ID: 24374682
In this case Group one is Product, Group two is Sales Person and then I have my custid field is there any way to identify the duplicate custid's by changing the background color?
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error when saving to sql table a '/' 5 30
Caste datetime 2 64
SQL Server 2008 R2 - Sums/Grouping 7 62
source and target row counts 4 39
How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

837 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