title: Conditional group SUM in Crystal Reports
body: <p>I've been doing some accounting reports and have been summing up my different currencies using a formula</p>
  
  <p>IE</p>
  
  <p><strong>CanadianCommissionFormula</strong></p>
  
  <pre><code>if {myData;1.CurrencyType} = "CDN" then
      {myData;1.Commission} 
  else
      0
  </code></pre>
  
  <p><br />
  <strong>CanadianCommissionSum</strong></p>
  
  <pre><code>SUM({@CanadianCommissionFormula})
  </code></pre>
  
  <p>Then I'd just display the CanadianCommissionSum at the bottom of the report and things were great.</p>
  
  <p>I've just come across the requirement to do this, but grouped by Sales Rep. I tried using my previous formula, but this sums for the whole report. Is there an easy way to sum like this, based on which group it's in?</p>