title: crystal reports - formula field conditional statement on what records to sum
body: <p><strong>crystal reports formula field</strong>
  Good day,
  I am making a sales report on Crystal Report - VS2010 c#</p>
  
  <p>I have this view in MS SQL</p>
  
  <p>vSales</p>
  
  <pre><code>OrderNo
  
  OrderDate
  
  Amount
  
  PaymentType
  </code></pre>
  
  <p>Payment type can either be Cash or Check
  I performed select all because I need both in the same report</p>
  
  <p>so how do I get the sum of Amount where PaymentType is equal to cash?</p>
  
  <p>I used Sum for my total Amount, both check and cash, in the formula workshop</p>
  
  <pre><code>Sum ({vDailySales.Amount})
  </code></pre>
  
  <p>I can't modify my SELECT statement because I need all the record with cash &amp; check payment</p>