title: Getting blank report generated in JasperReports using bean datasource and subreports
body: <p>I am creating a <em>JasperReports</em>'s report, which has only subreports in it.</p>
  
  <p>Following is the scenario that I am currently facing. </p>
  
  <p>For simplifying the question, let us consider only two jasper reports:
  mainReport and subReportFile1. </p>
  
  <p>My Main report jasper file is as follows:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;!-- Created with Jaspersoft Studio version 5.6.1.final using  JasperReports Library version 5.6.1  --&gt;
   &lt;!-- 2015-01-28T14:21:34 --&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="mainReport" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="84a1df53-5934-4d37-a3ae-44735dfd5dc3"&gt;
    &lt;property name="com.jaspersoft.studio.unit." value="pixel"/&gt;
    &lt;property name="ireport.zoom" value="1.0"/&gt;
    &lt;property name="ireport.x" value="0"/&gt;
    &lt;property name="ireport.y" value="1936"/&gt;
   &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/&gt;
   &lt;parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"&gt;
       &lt;defaultValueExpression&gt;&lt;![CDATA["/my/file/path/jaspers/"]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="customObjectList" class="java.util.List"/&gt;
    &lt;detail&gt;
      &lt;band height="181" splitType="Stretch"&gt;
          &lt;subreport&gt;
              &lt;reportElement x="0" y="3" width="554" height="157" uuid="782c39a9-1617-403c-b997-36f5cb9cdefd"/&gt;
              &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{malwareList})]]&gt;&lt;/dataSourceExpression&gt;
              &lt;subreportExpression&gt;&lt;![CDATA["/my/file/path/jaspers/subreport.jasper"]]&gt;&lt;/subreportExpression&gt;
          &lt;/subreport&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
   &lt;/jasperReport&gt;
  </code></pre>
  
  <p>The subreport has following fields for which I have created the following custom bean class, and send this as parameter to the main report file.
  I have CustomBeanClass with the following fields:</p>
  
  <pre><code>    String field1;
      String field2;
      private int field3;
      int field4;
      String field5;
      String date;
  </code></pre>
  
  <p>I am executing the following line in my java file and still I am getting a blank pdf report file. </p>
  
  <pre><code>  JasperRunManager.runReportToPdfFile(path, "/home/neeraj/test.pdf",
                  parametersMap, new JREmptyDataSource());
  </code></pre>
  
  <p>Parameters map has the list which I send to the subreport. And this is what I want to do. Send the datasources of bean list to the other subreports that are present. </p>
  
  <p>Where am I going wrong?</p>