<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <title>Basic Subreport Test</title>
  <version>1</version>
  <logging-level>DEBUG</logging-level>
  <documentation> 
    <author>Will Gorman</author>  
    <description>Basic Subreport test</description>  
    <result-type>report</result-type>  
  </documentation>

  <inputs>
     <output-type type="string">
         <default-value>html</default-value>
         <sources>
             <request>type</request>
         </sources>
     </output-type>
  </inputs>

  <outputs/>

  <resources> 
    <report-definition> 
      <solution-file> 
        <location>subreport-parent.xml</location>  
        <mime-type>text/xml</mime-type> 
      </solution-file> 
    </report-definition> 
  </resources>
  
  <actions> 
    <action-definition> 
      <component-name>SQLLookupRule</component-name>
      <action-type>SQL Query For Report Data</action-type>
      <action-outputs> 
        <query-result type="result-set" mapping="main_query"/> 
      </action-outputs>
      <component-definition> 
        <jndi>SampleData</jndi>  
        <live>true</live>  
        <query><![CDATA[select DISTINCT POSITIONTITLE from QUADRANT_ACTUALS order by POSITIONTITLE]]></query> 
      </component-definition> 
    </action-definition>

    <action-definition>
      <component-name>SQLLookupRule</component-name>
      <action-type>SQL Query For Report Data</action-type>
      <action-outputs>
        <query-result type="result-set" mapping="subreport_query"/>
      </action-outputs>
      <component-definition>
        <jndi>SampleData</jndi>
        <live>true</live>
        <query><![CDATA[select DISTINCT DEPARTMENT from QUADRANT_ACTUALS order by DEPARTMENT]]></query>
      </component-definition>
    </action-definition>

    <action-definition> 
      <component-name>JFreeReportComponent</component-name>
      <action-type>Create Report Using Query Results</action-type>
      <action-inputs> 
        <default mapping="main_query"/> 
        <subreport_query mapping="subreport_query"/>
        <output-type type="string"/>
      </action-inputs>
      <action-resources> 
        <report-definition type="resource"/> 
      </action-resources>
      <component-definition/> 
    </action-definition>
 
  </actions> 
</action-sequence>