title: jasper reports Subreport not working (not displaying data from database)
body: <p>I have Main Report which is containing Sub-report in Summary Section.
  What i want is i have column named bill no in database and i want to display the rows 
  which matches the bill no.(i.e in where clause of query it should where billno='something').</p>
  
  <p>Presently i am passing the parameter from main report to sub-report. But still its 
  not working.</p>
  
  <p>Main Report:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="SwastikReport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"&gt;
      &lt;property name="ireport.zoom" value="1.5"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="411"/&gt;
      &lt;parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA["E:\\reports\\"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
  &lt;subreport&gt;
                  &lt;reportElement x="438" y="56" width="109" height="100"/&gt;
                  &lt;subreportParameter name="billoflading"&gt;
                      &lt;subreportParameterExpression&gt;&lt;![CDATA[$F{billofladingno}]]&gt;&lt;/subreportParameterExpression&gt;
                  &lt;/subreportParameter&gt;
                  &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                  &lt;subreportExpression&gt;&lt;![CDATA[$P{SUBREPORT_DIR} + "SwastikReport_subreport.jasper"]]&gt;&lt;/subreportExpression&gt;
              &lt;/subreport&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Subreport :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="SwastikReport_subreport" language="groovy" pageWidth="555" pageHeight="802" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Error"&gt;
      &lt;property name="ireport.zoom" value="1.5"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
  &lt;parameter name="billoflading" class="java.lang.String"&gt;
      &lt;defaultValueExpression&gt;&lt;![CDATA[]]&gt;&lt;/defaultValueExpression&gt;
  &lt;/parameter&gt;
      &lt;queryString&gt;
          &lt;![CDATA[select * from declaredvaluedetails d where d.billofladingno='$P{billoflading}']]&gt;
      &lt;/queryString&gt;
      &lt;field name="billofladingno" class="java.lang.String"/&gt;
      &lt;field name="bookingno" class="java.lang.String"/&gt;
      &lt;field name="freightcharges" class="java.math.BigDecimal"/&gt;
      &lt;field name="ratedas" class="java.lang.String"/&gt;
      &lt;field name="per" class="java.math.BigDecimal"/&gt;
      &lt;field name="rate" class="java.math.BigDecimal"/&gt;
      &lt;field name="prepaid" class="java.math.BigDecimal"/&gt;
      &lt;field name="collect" class="java.math.BigDecimal"/&gt;
      &lt;field name="currencyrateofexchange" class="java.math.BigDecimal"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;detail&gt;
          &lt;band height="37" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="33" y="14" width="82" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{freightcharges}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="120" y="14" width="72" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{ratedas}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="196" y="14" width="32" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{per}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="230" y="14" width="68" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{rate}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="299" y="14" width="82" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{prepaid}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="383" y="14" width="82" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{collect}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="468" y="14" width="81" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{currencyrateofexchange}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>It displays null on main report.</p>