title: Jasper Reports Group VS Oracle Order By
body: <p>I have a report that I am in the process of converting from Crystal Reports to JasperReports.  I am designing the report using iReport 4.5 and JasperReport Server 4.5. Oracle Stored Procedure that returns <code>REF_CURSORS</code> is used to populate data.  Below is a sample SQL: </p>
  
  <pre><code>Select First_Name, Last_Name, DOB, City From PPL Order By DOB;
  </code></pre>
  
  <p>When I use this SQL in the report designer and design a report and I create groups as follows</p>
  
  <p>Parent Group is First_Name
  Second Group is City</p>
  
  <p>Basically I want to group all the people with similar first name in the all the cities it applies.</p>
  
  <p>Expected results:</p>
  
  <pre><code>First_Name       Last_Name      DOB              City
  Alan             Kum            10/01/2010       Mumb
  Alan             Boss           01/10/2001       Mumb 
  Alan             Cross          10/10/2000       Irvn
  </code></pre>
  
  <p>But since the SQL has an order by clause my data is not displayed in the expected manner as displayed above.  How do I overcome this issue?</p>
  
  <p>The issue is I can not change the procedure as it's being used in the application and also an Excel version of the report uses the same query where they want to see the data in order by DOB.</p>