title: How to make Jasper Reports programmatically determine the Name of Columns within the report it self?
body: <p>I am generating a report with that will have a 7 columns where the last 6 should have the the last 6 months listed. So as of the time of this writing it should be:</p>
  
  <pre><code>NAME -&gt; September -&gt; August -&gt; July -&gt; June -&gt; May -&gt; April
  </code></pre>
  
  <p>ss the column headers. I am trying to avoid having to pass them in as parameters, and am trying to get Jasper Reports to figure it out at runtime. I can get the first month pretty easily using a Text Field Expression. It looks like:</p>
  
  <pre><code>new java.text.SimpleDateFormat("MMMMM").format(new Date())
  </code></pre>
  
  <p>The issue comes in with the other months. I initially tried </p>
  
  <pre><code>new java.text.SimpleDateFormat("MMMMM").format(java.util.Calendar.getInstance().add(Calendar.MONTH, new Integer("-1)).getTime())
  </code></pre>
  
  <p>This does not work since <code>Calendar.add</code> does not return a <code>Calendar</code> instance. I then tried using a variable and then a combination of variables which also did not work. </p>
  
  <p><strong>How to make Jasper Reports programmatically determine the Name of Columns within the report it self?</strong></p>