title: Crystal report returns wrong total with report groups (Double the original amount)
body: <p>I have a report format like</p>
  
  <pre><code>Main Report
  
  Installment # 1
  
  SubReport
  ---------------
       Group 1 (Suppressed)
          Group 2 Detail 1: 
            ID    Amount (Formula field)
            --   ------- 
             1     100
  
  
           Group 2 (Footer)
            ------------
            Total  200
            ------------
  
           Group 2 Detail 2: 
            ID    Amount (Formula field)
            --   ------- 
             1     300
  
  
           Group 2 (Footer)
            ------------
            Total  600
            ------------
  </code></pre>
  
  <p>Problem I am having is that I am having wrong totals for the formula field in my Group 2 footer (I cannot understand why they are doubled)</p>
  
  <p>I am creating the total field in 2 steps. First I create the variable inside the detail section of Group 2</p>
  
  <p><strong>My formula field for the Amount</strong>  </p>
  
  <pre><code>WhilePrintingRecords;
  
  EvaluateAfter({@Share_Hundred_Percent});
  EvaluateAfter({@Less_Commission});
  EvaluateAfter({@Payment_NICL});
  EvaluateAfter({@Payment_PRCL});
  
  shared numberVar sumNetPayable;
  numberVar result:=0;
  
  if({Command.GENCLIENTCODE}=990) then
      result:= {@Share_Hundred_Percent}-{@Less_Commission} + {@Payment_PRCL}
  else
      result:= {@Share_Hundred_Percent} - {@Less_Commission} ;
  
  sumNetPayable := sumNetPayable + result;
  result
  </code></pre>
  
  <p>Then I reset the total field in group 2 footer (but it prints double the amount)</p>
  
  <p><strong>My formula field to display the total</strong></p>
  
  <pre><code>WhilePrintingRecords;
  EvaluateAfter({@Net_Payable});
  
  shared numberVar sumNetPayable;
  numberVar result:= sumNetPayable;
  sumNetPayable :=0;
  
  result
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>@SilentD. Here is what I found. I deleted both the formulas from the report design view (detail formula+summary). I only placed the Sum Fomula in footer and it works. But when I put the details formula in report the totals are doubled</p>