<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 -->
<!-- 2016-01-02T23:09:52 -->
<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="8f749217-51eb-4c79-9b11-5a3e11b5b1b4">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="MyXE_ssh"/>
<queryString>
<![CDATA[select * from dept where deptno=10]]>
</queryString>
<field name="DEPTNO" class="java.math.BigDecimal"/>
<field name="DNAME" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="221" splitType="Stretch">
<staticText>
<reportElement x="7" y="2" width="100" height="30" uuid="2bc03b83-e484-46e5-8681-48a9b01ac437"/>
<text><![CDATA[DEPTNO]]></text>
</staticText>
<staticText>
<reportElement x="160" y="2" width="100" height="30" uuid="3dfc25f3-6ff1-4186-8ee6-c71759a749a7"/>
<text><![CDATA[DNAME]]></text>
</staticText>
<subreport>
<reportElement x="10" y="60" width="544" height="20" uuid="e947974e-27bc-4b90-b0ee-f709b969c91b"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>
</subreport>
</band>
</title>
<pageHeader>
<band height="73" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="36" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="35" splitType="Stretch"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="44" splitType="Stretch">
<subreport>
<reportElement x="130" y="10" width="200" height="34" uuid="892a1adf-f7e7-4804-8f7f-a5227516afb5"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["rep1/subrep2.jasper"]]></subreportExpression>
</subreport>
</band>
</summary>
</jasperReport>
Please, is there any way to select all the <subreport> elements, so the result of a query would be something like:
<subreport>
<reportElement x="10" y="60" width="544" height="20" uuid="e947974e-27bc-4b90-b0ee-f709b969c91b"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement x="130" y="10" width="200" height="34" uuid="892a1adf-f7e7-4804-8f7f-a5227516afb5"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["rep1/subrep2.jasper"]]></subreportExpression>
</subreport>
The problem is that subreport sections can be nested more or less anywhere, so I don't know the path. Any suggestions would be highly appreciated.