title: jasperReport/iReport subreport shows blank (not displayed)
body: <p>I am trying to create a sub report(<strong>report1_subreport3.jrxml</strong>) from the main report(<strong><em>report1.jrxml</em></strong>) using iReport designer (both with <strong>empty data source</strong>) . The main report <strong>detail band</strong> contains a static text (<strong>"Main Report"</strong>) and the subreport element and the subreport  contains a static text in its corresponding detail band(<strong>"Sub Report"</strong>)</p>
  
  <p>But clicking the preview tab of the <strong>main report</strong> shows only static text  "Main Report" <strong>not displaying the static text of subreport</strong> ("Sub Report") .</p>
  
  <p>I also went through the link <a href="https://i.stack.imgur.com/fKyKW.jpg" rel="noreferrer">http://community.jaspersoft.com/questions/524978/empty-subreport-xml-datasource-ireport</a> but still facing the issue .</p>
  
  <p>Below is the <strong>report1.jrxml</strong></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="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="20036b98-ef64-4dea-8345-b89bcd8f2671"&gt;
      &lt;property name="ireport.zoom" value="1.0"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="68"/&gt;
      &lt;parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA["D:\\soapReport\\jasperReport\\"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="79" splitType="Stretch"/&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="35" splitType="Stretch"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"/&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="125" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="d49ee6bf-1a13-41bb-9feb-f0fb2ec414f2" x="71" y="28" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[Main Report]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;subreport&gt;
                  &lt;reportElement uuid="364d3c38-a0a1-4fa5-b0bf-12b22314ac5e" x="311" y="14" width="200" height="100"/&gt;
                  &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                  &lt;subreportExpression&gt;&lt;![CDATA[$P{SUBREPORT_DIR} + "report1_subreport3.jasper"]]&gt;&lt;/subreportExpression&gt;
              &lt;/subreport&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height="45" splitType="Stretch"/&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height="54" splitType="Stretch"/&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height="42" splitType="Stretch"/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>and below is the <strong><em>report1_subreport3.jrxml</em></strong></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="report1_subreport3" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="7ca2d973-972c-4c56-8d5e-503b32b4afc6"&gt;
      &lt;property name="ireport.zoom" value="1.0"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="79" splitType="Stretch"/&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="35" splitType="Stretch"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"/&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="125" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="5f488fe4-f9f7-4f12-9c1e-812661026bd7" x="222" y="50" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[Sub Report]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height="45" splitType="Stretch"/&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height="54" splitType="Stretch"/&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height="42" splitType="Stretch"/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Thanks in advance for any help on that ...</p>
  
  <hr>
  
  <p>Thanks Gopi for the change, but <strong><em>still it is showing the blank in the place of</em></strong> <strong>subreport</strong> . <strong>Below is the main report</strong>  </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="report1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="748f862c-3467-4c8c-89f6-04a571192482"&gt;
      &lt;property name="ireport.zoom" value="1.0"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
      &lt;parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA["D:/soapReport/jasperReport/"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;queryString&gt;
          &lt;![CDATA[]]&gt;
      &lt;/queryString&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="79" splitType="Stretch"/&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="35" splitType="Stretch"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"/&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="71" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="17f2cfc8-497a-4676-b83a-acf55bccac04" x="33" y="15" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[Main Report]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height="134" splitType="Stretch"&gt;
              &lt;subreport&gt;
                  &lt;reportElement uuid="40f53bea-c9eb-46a7-b4fc-3d592da3ef90" x="234" y="17" width="200" height="100"/&gt;
                  &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                  &lt;subreportExpression&gt;&lt;![CDATA["D:/soapReport/jasperReport/report1_subreport1.jasper"]]&gt;&lt;/subreportExpression&gt;
              &lt;/subreport&gt;
          &lt;/band&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height="54" splitType="Stretch"/&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height="42" splitType="Stretch"/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;       
  </code></pre>
  
  <p><strong>and below is the subreport</strong> </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="report1_subreport1" language="groovy" pageWidth="555" pageHeight="802" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="62bf7fb7-8145-4aa6-b963-c98eefac9862"&gt;
      &lt;property name="ireport.zoom" value="1.0"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="9bf9eafc-c1e0-49fa-8bb8-ed6c496498da" x="213" y="20" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[Sub Report]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>PLease help me if I am missing something...</p>