title: passing parameters from a table in main report to subreport
body: <p>I want to pass field of table in main report to subreport as a parameter in <em>JasperReports</em></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;jasperReport xmlns ---- &gt;
      &lt;subDataset name="tableDataset" &gt;
      &lt;queryString&gt;
          &lt;![CDATA[{select * from person]]&gt;
      &lt;/queryString&gt;
      &lt;field name="ID" class="java.lang.Integer"/&gt;
      &lt;/subDataset&gt;
          &lt;title&gt;
              &lt;jr:table &gt;
                  &lt;jr:column width="133" &gt;
                      &lt;jr:detailCell &gt;
                          &lt;textField&gt;
                              &lt;textFieldExpression&gt;&lt;![CDATA[$F{ID}]]&gt;&lt;/textFieldExpression&gt;
                          &lt;/textField&gt;
                      &lt;/jr:detailCell&gt;
                  &lt;/jr:column&gt;
                  ---
                  --
                  &lt;/jr:table&gt;
          &lt;/title&gt;
          &lt;summary&gt;
                  &lt;subreport&gt;
  &lt;subreportParameter name="ID"&gt;
                  &lt;subreportParameterExpression&gt;&lt;![CDATA[$F{ID}]]&gt;     &lt;/subreportParameterExpression&gt;
              &lt;/subreportParameter&gt;
                      &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                      &lt;subreportExpression&gt;&lt;![CDATA["phonemumbers.jasper"]]&gt;&lt;/subreportExpression&gt;
                  &lt;/subreport&gt;
  
  
          &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>I passed parameter to subreport as above but getting error as field not found</p>