title: Add opening and closing balance columns
body: <p>I have a table like this:</p>
  
  <pre><code>StockNumber|InventoryName|Year|Month|Adj|iss|piss|Tsfr|return|rdj|rpo|xefr
  alb001      clinic1       2010  1     4   5    5   5    6      5   4   10
  alb001      Clinic1       2010  2    10  2    2    3    3      4   4   4
  alb001      Clinic1       2010  4    11  3   5    77    90     78   9   6
  alb001      Clinic1       2010  5    10  2    2    3    3      4   4   4
  </code></pre>
  
  <p>I want to add a closing balance column which will be </p>
  
  <pre><code>sum(return+rdj+rpo+xefr) - sum(adj+iss+piss+tsfr)
  </code></pre>
  
  <p>I also want to add the opening balance column which will be the be the closing balance of the previous month.</p>
  
  <p>I will then calculate the current months balance as:</p>
  
  <pre><code>OpeningBalance + sum(return+rdj+rpo+xefr) - sum(adj+iss+piss+tsfr) = ClosingBalance
  </code></pre>
  
  <p><strong>NB.</strong> The Year and Month columns are floats and also want to change them to date  format.</p>
  
  <p>I am newbie to SQL and crystal reports. I want a query to help me achieve the tasks of developing a report that has the opening and closing balance columns, the opening balance being the previous closing balance.</p>