title: How to aggregate (sum) values over month in jasperreports (each month should be the sum of all month before)
body: <p>I want to do a report with jasperreports that aggregates our contracts over the month but adding all new and old contracts to the month. The database is a mysql database.
  My SELECT would look like this with example data below:</p>
  
  <pre><code>SELECT month(contract_date), amount
  FROM contracts
  WHERE year(contract_date)=2013
  GROUP BY month(contract_date)
  
  1.1.2013 300
  1.1.2013 500
  1.2.2013 250
  1.3.2013 250
  </code></pre>
  
  <p>Now i get:</p>
  
  <pre><code>1 800
  2 250
  3 250
  ...
  </code></pre>
  
  <p>But i would like to have:</p>
  
  <pre><code>1 800
  2 1050
  3 1300
  ...
  </code></pre>
  
  <p>So each month contains the amount of all month before.</p>
  
  <p>I dont mind if i can do this in SQL or with jasperreports/iReport, so any solution is welcome.
  Is there any way i can do this?</p>