title: How can I add a unique count of a specific field to my report?
body: <p>I have a C# program with output that looks like this (unexpanded rows):
  <img src="https://i.stack.imgur.com/YAyDB.png" alt="unexpanded rows"></p>
  
  <p>and this (expanded rows):
  <img src="https://i.stack.imgur.com/QeDtR.png" alt="expanded rows"></p>
  
  <p>Here's my SQL for the Fill method:</p>
  
  <pre><code>SELECT       MBRSEP, LOCATION, BILLMOYR, RATE
  FROM         CAR1.CAV_MBRHISTDETL
  WHERE        (BILLMOYR IN ('1104', '1105', '1106', '1107', '1108', '1109')) AND (RATE = '0096')
  ORDER BY     BILLMOYR ASC, MBRSEP ASC
  </code></pre>
  
  <p>What this report is showing is a breakdown of customers with a rate type of 0096 for the months of April, May, June, July, August, and September.  </p>
  
  <p>What I'd like to see is a unique count for each distinct customer (MBRSEP) (a grand total of unique customers for those months), but I can't get my head around how to do this.  Can anyone help or point me in the right direction?  This little program was written with Visual Studio 2010 using a blank form, a databound dataset, and a reportviewer control.  </p>
  
  <p>EDIT: Also, here is the report source on the report design screen:</p>
  
  <p><img src="https://i.stack.imgur.com/J7jdn.png" alt="report source"></p>
  
  <p>On the designer screen, I'm assuming there's some way to add a field that will show total number of unique values in a certain field in the report, but I'm not sure how to do that. (NOTE: I just added the SQL statements in a text field on the report for clarity)</p>