title: JasperReports nested loop
body: <p>The goal is the following structure</p>
  
  <pre><code>Static Text
  --------------------
  Category 1
      SubCategory 1_1
      SubCategory 1_2
      ...
  Category 2
      SubCategory 2_1
      ....
  ...
  --------------------
  StaticText
  </code></pre>
  
  <p>To get the dynamic data i use the following bean structure</p>
  
  <pre><code>public class  BeanFactory {
  
    public  static Collection getVehicleData() {return the Collection}
  }
  </code></pre>
  
  <p>Category class</p>
  
  <pre><code>public class VehicleData {
    private String category;
    private List&lt;WarningData&gt; warnings;
  }
  </code></pre>
  
  <p>The WarningData class is a POJO. So can anyone give me a hint how i can get this kind of structure?</p>
  
  <ol>
  <li>I tried to use two data set, one is using the beanfactory to create the data and one should use the vehicledata class to get the warningdata. But this did not work for me.</li>
  <li>I tried to group it. But i don't know how to access the warning data</li>
  <li>Should i use a table or a list component from the iReport Designer?</li>
  <li>Can i use a loop in the expression editor?</li>
  </ol>
  
  <p><strong>Update</strong>
  To make this clear. How can i iterate over the subcategories? I succeed with the iteration over the categories, but i don't know how i iterate for every category over the subcategories.</p>