title: net.sf.jasperreports.engine.JRException:Resource not found
body: <p>I try to use subreport using <em>JasperSoft Studio</em> but I get the exception below. It cannot find the subreport file although it is there.</p>
  
  <pre><code>net.sf.jasperreports.engine.JRException:Resource not found at: D:\\JASPERREPORTS\\MyReports
  </code></pre>
  
  <p>Below is the configuration of main report </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Created with Jaspersoft Studio version last--&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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0a6d6643-1d79-4e5e-b39d-a773bba37c12"&gt;
      &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="kai3_adapter"/&gt;
      &lt;queryString&gt;
          &lt;![CDATA[select * from cm_crew]]&gt;
      &lt;/queryString&gt;
      &lt;field name="OID" class="java.math.BigDecimal"/&gt;
      &lt;field name="CREW_OID" class="java.lang.String"/&gt;
      &lt;field name="CONTACT_OID" class="java.math.BigDecimal"/&gt;
      &lt;field name="ACTIVE" class="java.lang.String"/&gt;
      &lt;field name="ONSHIFT" class="java.lang.String"/&gt;
      &lt;field name="SHIFT_ID" class="java.lang.String"/&gt;
      &lt;field name="SHIFT_START" class="java.sql.Timestamp"/&gt;
      &lt;field name="CREW_STATUS" class="java.lang.String"/&gt;
      &lt;group name="CREW_OID"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{CREW_OID}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&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;staticText&gt;
                  &lt;reportElement x="0" y="0" width="141" height="20" uuid="fc7cf2eb-2922-42e3-b446-fa1cba3239d6"/&gt;
                  &lt;text&gt;&lt;![CDATA[CREW_OID]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="141" y="0" width="138" height="20" uuid="1fb08aed-592e-437d-9c3c-87e763dc81f8"/&gt;
                  &lt;text&gt;&lt;![CDATA[ACTIVE]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="279" y="0" width="138" height="20" uuid="76eaa47f-6f18-4210-a607-a6456b1cc4ed"/&gt;
                  &lt;text&gt;&lt;![CDATA[ONSHIFT]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="417" y="0" width="138" height="20" uuid="273fca2c-2b50-4157-ab3b-8545d94855f3"/&gt;
                  &lt;text&gt;&lt;![CDATA[CREW_STATUS]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="257" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="0" y="13" width="141" height="20" uuid="ef3acaa1-b11a-4b3d-b90d-7da18fc15dfa"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{CREW_OID}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="141" y="13" width="138" height="20" uuid="2c29e96a-d712-4aff-9449-46f523ebbad8"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{ACTIVE}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="279" y="13" width="81" height="20" uuid="70df46c9-e63a-45a0-8c6e-82e38c260681"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{ONSHIFT}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;subreport&gt;
                  &lt;reportElement x="380" y="20" width="165" height="170" uuid="3c312fc6-a389-4e46-af09-ddb1bfaa353f"/&gt;
                  &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                  &lt;subreportExpression&gt;&lt;![CDATA["D:\\JASPERREPORTS\\MyReports\\"]]&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>