title: Crystal Reports total calculation of account in ledger type report
body: <p>I am developing a crystal report that is like a ledger report but it also includes the invoice details too.</p>
  
  <p>lets say XYZ account ledger Report:</p>
  
  <pre><code>Invoice#  Details                         Debit         Credit        Balance
                         Qty rate  total
  ______________________________________________________________________________
  1        product A       1  100    100                
                                             100$           0               100$
  _______________________________________________________________________________
  2        product B       2  150    300
  2        product C       1  200    200
  2        product D       2  100    200
                                             700$          0                2200$
  _______________________________________________________________________________
                            Grand Toal      **2200$**      0$              **2200$**
  </code></pre>
  
  <p>the problem is in calculating the total when detail part contain more than one entry it calculate each detail record separately instead of total of an invoice.
  what I want is</p>
  
  <pre><code>*Invoice#  Details                         Debit         Credit        Balance
                         Qty rate  total
  ______________________________________________________________________________
  1        product A       1  100    100                
                                             100$           0               100$
  _______________________________________________________________________________
  2        product B       2  150    300
  2        product C       1  200    200
  2        product D       2  100    200
                                             700$          0                800$
  _______________________________________________________________________________
                            Grand Toal      **800$**      0$              **800$*** 
  </code></pre>
  
  <p>invoice detail is in detail section of report and debit, credit is in group of invoice by Invoice ID.</p>