title: Count distinct values in report
body: <p>My report needs to count the number of vehicles that come into the station each day. I created a group for the date field and made formula which takes that result. It counts records, but it counts previous days as well:</p>
  
  <pre><code>date       vno    vehile_type  job_done
  1/3/2017   aa123   hero          cha
  1/3/2017   aa123   hero          cha
  1/3/2017   aa123   herohonda     cha
  </code></pre>
  
  <blockquote>
    <p>no of hero:2  no of herohonda :1</p>
  </blockquote>
  
  <pre><code>2/3/2017   aa123   hero          cha
  2/3/2017   aa123   herohonda     cha
  2/3/2017   aa123   herohonda     cha
  </code></pre>
  
  <blockquote>
    <p>no of hero:3  no of herohonda :3</p>
  </blockquote>
  
  <p>this is my formula</p>
  
  <h2>for "count1" formula</h2>
  
  <pre><code>numbervar totalcount;
  If {vehicle.vtype} = "HeroHonda" then
      totalcount := totalcount +1
  else
  totalcount := totalcount
  </code></pre>
  
  <hr>
  
  <h2>for count2 formula</h2>
  
  <pre><code>numbervar totalcount1;
  If {vehicle.vtype} = "Hero" then
      totalcount1 := totalcount1 +1
  else
      totalcount1 := totalcount1
  </code></pre>
  
  <hr>
  
  <p>i need to get the result like the following </p>
  
  <pre><code>date       vno    vehile_type  job_done
  1/3/2017   aa123   hero          cha
  1/3/2017   aa123   hero          cha
  1/3/2017   aa123   herohonda     cha
  </code></pre>
  
  <blockquote>
    <p>no of hero:2  no of herohonda :1</p>
  </blockquote>
  
  <pre><code>2/3/2017   aa123   hero          cha
  2/3/2017   aa123   herohonda     cha
  2/3/2017   aa123   herohonda     cha
  </code></pre>
  
  <blockquote>
    <p>no of hero:1  no of herohonda :2</p>
  </blockquote>