title: creating subreport with iReport tool for JasperReports
body: <p>I'm working on a <code>struts</code> based application. I want to create a Jasper report containing questions and responses for a <em><code>Paper</code></em> Object. Clearly I have a List of <em><code>Paper</code></em> objects containing part attribute and each <em><code>Paper</code></em> object internally has a List of <em><code>Questions</code></em>. Also each <em><code>Question</code></em> has a List of Responses.</p>
  
  <p>I could create the main report with Paper object which displays different part names. But I want to display the questions associated with the part and responses associated with each question. </p>
  
  <p>My Model classes will be:</p>
  
  <pre class="lang-java prettyprint-override"><code>// Paper
  public class Paper {
  
      public String partName;
      public List&lt;Question&gt; questions;
  }
  
  // Question
  public class Question {
  
      public String question;
      public List&lt;Answer&gt; answers;
  }
  
  // Answer
  public class Answer {
  
      public String answer;
  }
  </code></pre>
  
  <p>I know I have to use subreport in <code>iReport</code>. When i did so the compilation fails for the data source expression <code>new JRBeanCollectionDataSource($F{questions})</code></p>