JasperReport: Unexpected White Space Between <jr:listContents> Elements - jasper-reports

Hitting quite the roadblock on this one. I have a primary report which loads a subreport. Said subreport contains nested lists, of which the inner list is rendering some unexpected white space between elements. The white space is consistent in size, which almost seems as if the report is rendering a "ghost" element.
Relevant jrxml for reference:
<subDataset name="SurveyListDataSet">
<property name="com.jaspersoft.studio.data.defaultdataadapter" />
<queryString><![CDATA[]]></queryString>
<field name="surveyDate" class="java.lang.String"/>
<field name="surveyList" class="java.util.List"/>
</subDataset>
<subDataset name="SurveyDataSet">
<property name="com.jaspersoft.studio.data.defaultdataadapter" />
<queryString><![CDATA[]]></queryString>
<field name="question" class="java.lang.String"/>
<field name="response" class="java.lang.String"/>
</subDataset>
<field name="surveyDataList" class="java.util.List"/>
<detail>
<band height="17" splitType="Stretch">
<componentElement>
<reportElement x="0" y="0" width="505" height="17" isRemoveLineWhenBlank="true" />
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="SurveyListDataSet">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{surveyDataList})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="17" width="505">
<textField isStretchWithOverflow="true">
<reportElement style="report_value_bold" x="110" y="0" width="265" height="15" />
<textElement textAlignment="Left" />
<textFieldExpression><![CDATA[$F{surveyDate}]]></textFieldExpression>
</textField>
<line>
<reportElement style="line_light" x="105" y="16" width="400" height="1"/>
</line>
<componentElement>
<reportElement x="0" y="0" width="505" height="0" isRemoveLineWhenBlank="true" positionType="Float"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="SurveyDataSet">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{surveyList})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="34" width="505">
<textField isStretchWithOverflow="true">
<reportElement style="report_value" x="125" y="17" width="265" height="15" positionType="Float" />
<textElement textAlignment="Left" />
<textFieldExpression><![CDATA[$F{question}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement style="report_value_bold" x="300" y="17" width="195" height="15" isRemoveLineWhenBlank="true" positionType="Float" />
<textElement textAlignment="Right" />
<textFieldExpression><![CDATA[$F{response}]]></textFieldExpression>
</textField>
<line>
<reportElement style="line_light" x="105" y="33" width="400" height="1" positionType="FixRelativeToBottom" />
</line>
</jr:listContents>
</jr:list>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
Example output of what I'm seeing:
Expected: each Q/A appears right below the Q/A-line above it. There should not be any gaps between dates and the Q/A above it either.
I've tried tweaking various heights, postitionTypes, etc. to no avail. Feel like I'm probably missing something obvious but I've been staring at this too long. Appreciate any help!

Your innermost list reportElement is set to have a height of 0px while suddenly the listContents height is set to 34px but then only contains a TextElement of height 17px while the Detail band is set to 17px.
The basic concept when working with Lists in Jasperreports is that every inner list must have vertical space allocated in the list it is contained in. i.e. your innermost list must have space allocated in the outer list, positioned relative to other elements in the outer list. If a TextElement is streched due to isStretchWithOverflow="true" elements in the same List that are set to positionType="Float" will "Float" down and the list will extend. If the a inner list extends, the outer list will automatically also extend. (and elements in the outer list below the inner list will Float down if set to positionType="Float".
I've cleaned up your example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.0.final using JasperReports Library version 6.19.0 -->
<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="nbsp" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="77c97c1b-90ba-40a8-a5c3-f88b8a48a585">
<subDataset name="SurveyListDataSet" uuid="da0fc5b7-7621-4907-b2b7-e8fa130b1945">
<queryString>
<![CDATA[]]>
</queryString>
<field name="_THIS" class="java.lang.String"/>
</subDataset>
<subDataset name="SurveyDataSet" uuid="e7a6a451-fe26-427c-917d-59070a76a200">
<queryString>
<![CDATA[]]>
</queryString>
<field name="_THIS" class="java.lang.String"/>
</subDataset>
<detail>
<band height="34" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<componentElement>
<reportElement x="0" y="0" width="505" height="34" uuid="0d598531-c684-4c2b-be01-9ced3fa81f81">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="SurveyListDataSet" uuid="7eeeb416-bd57-43dc-bc19-47481921f2a7">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource(java.util.Arrays.asList(new String[] { "2022-01-01", "2022-02-01", "2022-03-01", "2022-04-01" }))]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="34" width="505">
<textField textAdjust="StretchHeight">
<reportElement x="110" y="0" width="265" height="15" uuid="c0bfd9da-139d-41a9-9b91-34c4db12ebe9"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{_THIS}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="105" y="16" width="400" height="1" uuid="d21b7ef6-f724-4ad9-a238-c68c28d486ab"/>
</line>
<componentElement>
<reportElement positionType="Float" x="0" y="17" width="505" height="17" uuid="54082666-799b-4117-92a5-255041315f7b">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<jr:list printOrder="Vertical">
<datasetRun subDataset="SurveyDataSet" uuid="f955dac7-55df-4fc3-8e30-cdeefe73a5be">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource(java.util.Arrays.asList(new String[] { "Question 1? ", "Question 2?", "Question 3?", "Question 4?" }))]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="17" width="505">
<textField textAdjust="StretchHeight">
<reportElement x="125" y="0" width="265" height="15" uuid="c1fb3fef-53d7-4e64-b05a-0478aed19226">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{_THIS}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="300" y="0" width="195" height="15" isRemoveLineWhenBlank="true" uuid="4dd5da20-e70f-4122-92e9-fea714edb33a">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{_THIS}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="105" y="16" width="400" height="1" uuid="b2e07c02-8deb-49fb-9a68-9f431a9f363d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
</line>
</jr:listContents>
</jr:list>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
</jasperReport>

Related

net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean: [duplicate]

This question already has answers here:
Error retrieving field value from bean
(2 answers)
net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : First_name
(3 answers)
Closed 7 months ago.
I want to generate a report and it's throwing an error that I don't know how to solve. The report is generated by the following .jrxml:
<?xml version="1.0" encoding="UTF-8"?>
<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="informeAIRe" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="03b7db3d-afd7-4f64-8a72-cf3d16f56c48">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<subDataset name="listaProyectosActivosPorPaisDataSet" uuid="5bbf5724-71a4-46c0-b3a8-591adffb4eed">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="obtenerPdfInforme"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="desProyectoI18n" class="java.lang.String"/>
<field name="desProyecto" class="java.lang.String"/>
<field name="lstEstacionesProyecto" class="java.util.List"/>
<field name="lstEstacionesProyectoDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<field name="desIntroProyectoI18n" class="java.lang.String"/>
<field name="desIntroAnemometrosEstacionesI18n" class="java.lang.String"/>
<field name="lstAnemometrosEstaciones" class="java.util.List"/>
<field name="lstAnemometrosEstacionesDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<field name="lstAnyosGrafica" class="java.util.List"/>
<field name="lstAnyosGraficaDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<field name="desIntroGraficaI18n" class="java.lang.String"/>
</subDataset>
<subDataset name="lstEstacionesProyectoDataSet" uuid="4b8e6f89-333d-4efd-a553-6ae182a4f7f5">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="obtenerPdfInforme"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="desAlias" class="java.lang.String"/>
</subDataset>
<subDataset name="lstAnemometrosEstacionesDataSource" uuid="3b9c85b4-8078-4829-8f9b-f59b9194b947">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="obtenerPdfInforme"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="desAliasYAlturaI18N" class="java.lang.String"/>
</subDataset>
<subDataset name="lstAnyosGraficaDataset" uuid="6cebee6e-125a-4594-be99-2e86ad01bd8c">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="obtenerPdfInforme"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="anio" class="java.lang.Integer"/>
<field name="lstDatosMensualesEstacion" class="java.util.List"/>
<field name="lstDatosMensualesEstacionDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
</subDataset>
<subDataset name="lstDatosMensualesEstacionDataSet" uuid="5476630d-7dab-485b-8808-37eae486a627">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="obtenerPdfInforme"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="fechaDesde" class="java.lang.String"/>
<field name="fechaHasta" class="java.lang.String"/>
<field name="valor" class="java.lang.String"/>
<field name="desAlias" class="java.lang.String"/>
</subDataset>
<field name="tituloInforme" class="java.lang.String"/>
<field name="instalaciones" class="java.lang.String"/>
<field name="desinstalaciones" class="java.lang.String"/>
<field name="mantenimientos" class="java.lang.String"/>
<field name="tituloVelocidadMedia" class="java.lang.String"/>
<field name="resumenVelocidadMedia" class="java.lang.String"/>
<field name="tituloResumen" class="java.lang.String"/>
<field name="tituloGrafica" class="java.lang.String"/>
<field name="listaVelocidadMedia" class="java.lang.Object"/>
<field name="listaGraficaVelocidadMedia" class="java.util.List">
<fieldDescription><![CDATA[listaGraficaVelocidadMedia]]></fieldDescription>
</field>
<field name="incidencias" class="java.lang.String"/>
<field name="labelX" class="java.lang.String"/>
<field name="labelY" class="java.lang.String"/>
<field name="minGraficaStr" class="java.lang.String"/>
<field name="maxGraficaStr" class="java.lang.String"/>
<field name="maxGrafica" class="java.lang.Double"/>
<field name="minGrafica" class="java.lang.Double"/>
<field name="listaProyectosActivosPorPais" class="java.util.List"/>
<field name="listaProyectosActivosPorPaisDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="53">
<image>
<reportElement x="500" y="22" width="55" height="18" uuid="2adf779f-58e3-4783-a6af-d0ddf3552646"/>
<imageExpression><![CDATA["/img/informeMail/aire.png"]]></imageExpression>
</image>
<image>
<reportElement x="0" y="1" width="110" height="44" uuid="a0d75635-60c3-4bed-9193-089479653974"/>
<imageExpression><![CDATA["/img/informeMail/iberdrola.png"]]></imageExpression>
</image>
<line>
<reportElement x="0" y="46" width="555" height="1" uuid="c16d9a6f-ff68-4553-b1ff-42a7e1652df4">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<graphicElement>
<pen lineWidth="2.0" lineColor="#8ABD37"/>
</graphicElement>
</line>
</band>
</pageHeader>
<detail>
<band height="233" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField>
<reportElement x="0" y="13" width="554" height="20" uuid="8b0ba726-a206-4097-9d24-05bce4fba361"/>
<textElement>
<font fontName="Calibri" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{tituloInforme}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="37" width="280" height="20" uuid="ab9a4730-53df-495f-97fb-3b038d73e950"/>
<textElement>
<font fontName="Calibri" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{tituloResumen}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="19" y="58" width="536" height="20" uuid="66502d86-1953-4728-8ebe-aa7fb6a09d94"/>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{instalaciones}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="19" y="78" width="536" height="20" uuid="91ec850b-370d-40c7-8161-68fcc6ef1e72"/>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{desinstalaciones}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="19" y="98" width="536" height="20" uuid="5caf75e5-b446-4be6-ab0b-e5f96b0e94bd"/>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{mantenimientos}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="137" width="554" height="20" uuid="0c5bef77-3ec3-4a62-8817-185b13132d60">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="7e39e3e7-ec4b-42e8-9704-e7e4a987beb1"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{tituloVelocidadMedia}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="10" y="161" width="544" height="35" uuid="497cea97-bbba-47e2-b37e-a6ebbc6355b4">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="836a5a66-ba53-47fb-af73-8b412aaf2814"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{resumenVelocidadMedia}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="10" y="198" width="544" height="30" uuid="646a8a82-2c3b-4828-92eb-d9a70636de3d">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="c615cee3-4234-492b-9712-ea16edc8fa59"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{tituloGrafica}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="19" y="119" width="536" height="18" uuid="8821c075-e00f-4e7b-ae1b-d8291a445567"/>
<textElement>
<font fontName="Calibri" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{incidencias}]]></textFieldExpression>
</textField>
</band>
<band height="400">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<lineChart>
<chart evaluationTime="Report">
<reportElement x="0" y="0" width="555" height="400" uuid="8bff1265-b471-4e53-b21d-7cc6b411b059">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<dataset resetType="Report">
<datasetRun subDataset="Dataset2" uuid="c6803ced-c454-49e4-bfd2-daa2330b6c91">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{listaGraficaVelocidadMedia})]]></dataSourceExpression>
</datasetRun>
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$F{desAlias}]]></seriesExpression>
<categoryExpression><![CDATA[$F{anio}]]></categoryExpression>
<valueExpression><![CDATA[$F{nVelocidaMedia}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot isShowLines="true" isShowShapes="false">
<plot backgroundAlpha="0.98" foregroundAlpha="1.0" labelRotation="52.0">
<seriesColor seriesOrder="0" color="#008000"/>
<seriesColor seriesOrder="1" color="#EC7000"/>
<seriesColor seriesOrder="2" color="#0045B7"/>
<seriesColor seriesOrder="3" color="#FF0000"/>
<seriesColor seriesOrder="4" color="#7030A0"/>
<seriesColor seriesOrder="5" color="#A6A6A6"/>
<seriesColor seriesOrder="6" color="#A4D76A"/>
<seriesColor seriesOrder="7" color="#FAAA05"/>
<seriesColor seriesOrder="8" color="#77AAFF"/>
<seriesColor seriesOrder="9" color="#FF8080"/>
<seriesColor seriesOrder="10" color="#FFC1FF"/>
<seriesColor seriesOrder="11" color="#D9D9D9"/>
</plot>
<categoryAxisLabelExpression><![CDATA[$F{labelX}]]></categoryAxisLabelExpression>
<categoryAxisFormat labelRotation="52.0">
<axisFormat labelColor="#000000" tickLabelColor="#000000" verticalTickLabels="false" axisLineColor="#000000">
<labelFont>
<font isBold="true"/>
</labelFont>
<tickLabelFont>
<font isBold="true"/>
</tickLabelFont>
</axisFormat>
</categoryAxisFormat>
<valueAxisLabelExpression><![CDATA[$F{labelY}]]></valueAxisLabelExpression>
<valueAxisFormat>
<axisFormat labelColor="#000000" tickLabelColor="#000000" verticalTickLabels="false" axisLineColor="#000000">
<labelFont>
<font isBold="true"/>
</labelFont>
<tickLabelFont>
<font isBold="true"/>
</tickLabelFont>
</axisFormat>
</valueAxisFormat>
<rangeAxisMinValueExpression><![CDATA[$F{minGrafica}.doubleValue()]]></rangeAxisMinValueExpression>
<rangeAxisMaxValueExpression><![CDATA[$F{maxGrafica}.doubleValue()]]></rangeAxisMaxValueExpression>
</linePlot>
</lineChart>
</band>
<band height="110">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<crosstab>
<reportElement x="0" y="0" width="555" height="110" uuid="6d3ecf82-bba3-414b-893f-72065d89630b">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<property name="com.jaspersoft.studio.crosstab.style.header" value="Crosstab 3_CH"/>
<property name="com.jaspersoft.studio.crosstab.style.group" value="Crosstab 3_CG"/>
<property name="com.jaspersoft.studio.crosstab.style.total" value="Crosstab 3_CT"/>
<property name="com.jaspersoft.studio.crosstab.style.detail" value="Crosstab 3_CD"/>
</reportElement>
<crosstabDataset>
<dataset resetType="Report">
<datasetRun subDataset="Dataset1" uuid="fed77a9c-4814-4dfa-a2e2-09baeae749b0">
<dataSourceExpression><![CDATA[$F{listaVelocidadMedia}]]></dataSourceExpression>
</datasetRun>
</dataset>
</crosstabDataset>
<rowGroup name="desAlias" width="45" totalPosition="End">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{desAlias}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents mode="Opaque" style="Crosstab 3_CH">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<textField>
<reportElement mode="Opaque" x="0" y="0" width="45" height="30" backcolor="#8ABD37" uuid="a9c233d8-6892-4f4d-9abe-affd4fe6751f"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{desAlias}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents mode="Opaque" style="Crosstab 3_CT">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement x="0" y="0" width="45" height="0" forecolor="#FFFFFF" uuid="be071980-2865-4744-af86-a633dece807d"/>
<text><![CDATA[Total desAlias]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="anio" height="20" totalPosition="End">
<bucket order="Descending" class="java.lang.String">
<bucketExpression><![CDATA[$F{anio}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents mode="Opaque" style="Crosstab 3_CH">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<textField>
<reportElement mode="Opaque" x="0" y="0" width="35" height="20" backcolor="#C7E29C" uuid="92479285-5ff5-43db-8bae-b62943559eb4"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{anio}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents mode="Opaque" style="Crosstab 3_CT">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<staticText>
<reportElement x="0" y="0" width="0" height="20" forecolor="#FFFFFF" uuid="59c47a57-85fb-4988-a249-4853e871bb87"/>
<text><![CDATA[Total anio]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="velocidadMedia_MEASURE" class="java.lang.String">
<measureExpression><![CDATA[$F{velocidadMedia}]]></measureExpression>
</measure>
<measure name="calidadAnemometro_MEASURE" class="java.lang.String">
<measureExpression><![CDATA[$F{calidadAnemometro}]]></measureExpression>
</measure>
<crosstabCell width="35" height="30">
<cellContents mode="Opaque" style="Crosstab 3_CD">
<textField pattern="0.0" isBlankWhenNull="true">
<reportElement x="0" y="0" width="35" height="15" uuid="2bb4288a-c744-44e6-9e04-e081ce6425ad"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{velocidadMedia_MEASURE}]]></textFieldExpression>
</textField>
<textField pattern="##0" isBlankWhenNull="true">
<reportElement x="0" y="15" width="35" height="15" uuid="57b5c9b4-6b4d-49fa-848f-112b6475a44d"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{calidadAnemometro_MEASURE}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="0" height="30" columnTotalGroup="anio">
<cellContents mode="Opaque" style="Crosstab 3_CT">
<textField>
<reportElement x="0" y="0" width="0" height="15" forecolor="#FFFFFF" uuid="cbd2211c-1e56-4f5a-bebc-a7866e1fbf30"/>
<textFieldExpression><![CDATA[$V{velocidadMedia_MEASURE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="15" width="0" height="15" forecolor="#FFFFFF" uuid="37328cd2-d9d1-4951-8d74-b83ca7047dc4"/>
<textFieldExpression><![CDATA[$V{calidadAnemometro_MEASURE}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="35" height="0" rowTotalGroup="desAlias">
<cellContents mode="Opaque" style="Crosstab 3_CT">
<textField>
<reportElement x="0" y="0" width="35" height="0" forecolor="#FFFFFF" uuid="2a07bad2-c071-4625-9362-d7bd4be003f3"/>
<textFieldExpression><![CDATA[$V{velocidadMedia_MEASURE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="35" height="0" forecolor="#FFFFFF" uuid="79d6d9c7-6c36-4fe7-9068-4a4aaced1740"/>
<textFieldExpression><![CDATA[$V{calidadAnemometro_MEASURE}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="0" height="0" rowTotalGroup="desAlias" columnTotalGroup="anio">
<cellContents mode="Opaque" style="Crosstab 3_CT">
<textField>
<reportElement x="0" y="0" width="0" height="0" forecolor="#FFFFFF" uuid="fa8c3299-5731-443e-90a9-95d11529398c"/>
<textFieldExpression><![CDATA[$V{velocidadMedia_MEASURE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0" forecolor="#FFFFFF" uuid="1dc6f439-c7b6-4a8f-8ce6-785fdbcbc274"/>
<textFieldExpression><![CDATA[$V{calidadAnemometro_MEASURE}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
</band>
<band height="299">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<componentElement>
<reportElement positionType="Float" x="3" y="19" width="547" height="280" uuid="c62a4d39-c7a6-47be-a10d-9d04d95d076b">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="listaProyectosActivosPorPaisDataSet" uuid="12d7dd8f-df47-4372-9b63-795a3bfa9da7">
<dataSourceExpression><![CDATA[$F{listaProyectosActivosPorPaisDataSource}]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="280" width="547">
<textField>
<reportElement positionType="Float" x="0" y="1" width="547" height="15" uuid="adb8f0b2-da6d-4eec-bd7a-8317e8b6d422">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{desProyectoI18n}]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" x="0" y="17" width="547" height="15" uuid="b6c9137c-b868-422d-859c-85afd226160b">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{desIntroProyectoI18n}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="0" y="33" width="547" height="18" uuid="894b7c81-46db-4789-ae59-fd42b6e33ec2">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</reportElement>
<jr:list printOrder="Vertical">
<datasetRun subDataset="lstEstacionesProyectoDataSet" uuid="a3452e17-a7e7-4701-a963-92d7c02b7997">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$F{lstEstacionesProyectoDataSource}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[$P{REPORT_CONNECTION}]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="18" width="547">
<textField textAdjust="StretchHeight">
<reportElement positionType="Float" x="0" y="0" width="547" height="15" uuid="659d5578-3875-4845-9503-d6398dc6b76d">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="9"/>
<paragraph leftIndent="25"/>
</textElement>
<textFieldExpression><![CDATA[$F{desAlias}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="16" width="547" height="1" forecolor="rgba(0, 0, 0, 0.0)" uuid="331a6b0e-149f-4189-8419-9eb7c696e042"/>
</line>
</jr:listContents>
</jr:list>
</componentElement>
<textField textAdjust="StretchHeight">
<reportElement positionType="Float" x="0" y="51" width="547" height="15" uuid="e0b9e7f9-323b-4249-9659-f2f0121c3a87">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{desIntroAnemometrosEstacionesI18n}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement positionType="Float" x="0" y="69" width="547" height="19" uuid="9d0f759c-039b-40e2-90f0-08efd2be27e6">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</reportElement>
<jr:list printOrder="Vertical">
<datasetRun subDataset="lstAnemometrosEstacionesDataSource" uuid="d1263bf7-a381-48b4-bade-fdd095ce08ce">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$F{lstAnemometrosEstacionesDataSource}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[$P{REPORT_CONNECTION}]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="19" width="547">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="547" height="19" uuid="11f44c5b-abf1-4a70-9cdc-9e7a03247eb4">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
</reportElement>
<textElement markup="none">
<font fontName="Calibri" size="9"/>
<paragraph leftIndent="25"/>
</textElement>
<textFieldExpression><![CDATA[$F{desAliasYAlturaI18N}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<line>
<reportElement positionType="Float" x="0" y="67" width="547" height="1" forecolor="rgba(0, 0, 0, 0.0)" uuid="3740db58-7a73-4746-bc8f-33e780da9934">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<graphicElement>
<pen lineColor="rgba(255, 255, 255, 0.0)"/>
</graphicElement>
</line>
<componentElement>
<reportElement x="0" y="108" width="547" height="172" uuid="daebaa0e-bdf9-4bec-ae0b-85f4bab05be0"/>
<jr:list printOrder="Vertical">
<datasetRun subDataset="lstAnyosGraficaDataset" uuid="498702eb-3931-499b-8fce-214d2c1f6adc">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$F{lstAnyosGraficaDataSource}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[$P{REPORT_CONNECTION}]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="172" width="547">
<lineChart>
<chart evaluationTime="Report">
<reportElement x="20" y="11" width="240" height="150" uuid="938fe9de-fb9f-4979-94f9-a5ec2975ed22"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<dataset resetType="Report">
<datasetRun subDataset="lstDatosMensualesEstacionDataSet" uuid="2fa2595c-1a6a-43a2-b359-0e8baf709970">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$F{lstDatosMensualesEstacionDataSource}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$F{desAlias}]]></seriesExpression>
<categoryExpression><![CDATA[$F{fechaDesde}]]></categoryExpression>
<valueExpression><![CDATA[$F{valor}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot>
<plot/>
<categoryAxisFormat>
<axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/>
</valueAxisFormat>
</linePlot>
</lineChart>
</jr:listContents>
</jr:list>
</componentElement>
<textField textAdjust="StretchHeight">
<reportElement positionType="Float" x="0" y="90" width="547" height="15" uuid="644115db-7947-4ed1-bfe2-6c7d9ec3b0f8">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="Calibri" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{desIntroGraficaI18n}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<line>
<reportElement positionType="Float" x="0" y="9" width="555" height="1" forecolor="rgba(0, 0, 0, 0.0)" uuid="ff372b70-a6f2-4f64-bd6f-a0ebcc9ace23"/>
</line>
<break>
<reportElement x="0" y="0" width="100" height="1" uuid="efdd0770-c3a1-4078-832d-e0cfc6c492b4"/>
</break>
</band>
</detail>
The error throwed when generating the report:
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean: .
Has somebody know how to solve this problem? thanks!!

Too much white space around jasper subreport

There is too much white space produced before and after a subreport in a pdf file generated using jasper.
Any help to eliminate the space around subreport component will help a lot.
Here is the main report template
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.2.final using JasperReports Library version 6.12.2-75c5e90a222ab406e416cbf590a5397028a52de3 -->
<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="with_sub_report" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="256c6d62-ba9b-404c-8e1c-eaeeca988125">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="JOURNAL_WITH_PAYMENT"/>
<property name="net.sf.jasperreports.data.adapter" value="JOURNAL_WITH_PAYMENT.xml"/>
<queryString language="json">
<![CDATA[entries]]>
</queryString>
<field name="jouranl_date" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="jouranl_date"/>
<fieldDescription><![CDATA[jouranl_date]]></fieldDescription>
</field>
<field name="journal_ref" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="journal_ref"/>
<fieldDescription><![CDATA[journal_ref]]></fieldDescription>
</field>
<field name="journal_line" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="journal_line"/>
<fieldDescription><![CDATA[journal_line]]></fieldDescription>
</field>
<field name="amount" class="java.math.BigDecimal">
<property name="net.sf.jasperreports.json.field.expression" value="amount"/>
<fieldDescription><![CDATA[amount]]></fieldDescription>
</field>
<field name="crncy" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="crncy"/>
<fieldDescription><![CDATA[crncy]]></fieldDescription>
</field>
<field name="dr_or_cr" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="dr_or_cr"/>
<fieldDescription><![CDATA[dr_or_cr]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="34" splitType="Stretch">
<staticText>
<reportElement x="0" y="5" width="100" height="25" uuid="0d465cec-66da-4e16-829e-c8728f0b770e"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Journal Date]]></text>
</staticText>
<staticText>
<reportElement x="150" y="5" width="100" height="25" uuid="c4dac4a0-f457-4700-b7ac-1d3b31604f62"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Journal Ref Num]]></text>
</staticText>
<staticText>
<reportElement x="290" y="5" width="100" height="25" uuid="81c750c7-2df3-4200-89e7-b8535b3193a5"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Journal line]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="25" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<textField>
<reportElement x="-10" y="4" width="120" height="16" uuid="f5f87f9d-fc7d-44ae-8c13-63b49db240ec">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="2e697f8a-57a8-4d0e-8faa-47180c6b44ae"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{jouranl_date}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="150" y="4" width="100" height="16" uuid="cf85e544-bef5-4e5b-9e73-7704a2bd4c5a">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="6c255841-3412-410f-a976-b3ec67868bc3"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{journal_ref}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="290" y="4" width="100" height="16" uuid="2b8664a2-652e-4426-9f8d-746286f7a12e">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1f3fb198-93d5-4592-b33e-4a61a1a9513b"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{journal_line}]]></textFieldExpression>
</textField>
<subreport overflowType="Stretch">
<reportElement x="-18" y="13" width="30" height="7" uuid="64cc178b-58b5-4273-ad0d-ea75d2c2524e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<printWhenExpression><![CDATA[new String("C").equals(($F{dr_or_cr}))]]></printWhenExpression>
</reportElement>
<subreportParameter name="dr_or_cr">
<subreportParameterExpression><![CDATA[$F{dr_or_cr}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="crncy">
<subreportParameterExpression><![CDATA[$F{crncy}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="amount">
<subreportParameterExpression><![CDATA[$F{amount}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]></dataSourceExpression>
<subreportExpression><![CDATA["payment_sub_report.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<pageFooter>
<band splitType="Stretch"/>
</pageFooter>
<summary>
<band height="52" splitType="Prevent">
<staticText>
<reportElement x="232" y="22" width="100" height="30" uuid="3fcd32ad-45a6-4153-9d0e-2a7c9f9f44d8"/>
<text><![CDATA[Static Text]]></text>
</staticText>
</band>
</summary>
</jasperReport>
And here is the subreport
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.2.final using JasperReports Library version 6.12.2-75c5e90a222ab406e416cbf590a5397028a52de3 -->
<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="payment_sub_report" pageWidth="549" pageHeight="30" columnWidth="549" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="aa23536f-b74a-40f9-911a-b1cbfad0a6a3">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<parameter name="dr_or_cr" class="java.lang.String"/>
<parameter name="crncy" class="java.lang.String"/>
<parameter name="amount" class="java.math.BigDecimal"/>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="29" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField>
<reportElement x="-12" y="4" width="100" height="16" uuid="ca02c58c-8c11-4354-9ebb-76a807062e46"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{dr_or_cr}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="183" y="4" width="100" height="16" uuid="763524dc-97d5-4e40-9dee-ad53d2d11be2"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{crncy}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="385" y="4" width="100" height="16" uuid="06f2e836-3420-4dff-b512-4ba837b0d1c6"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{amount}]]></textFieldExpression>
</textField>
</band>
</title>
</jasperReport>
Moreover the subreport comes too much to the right inspite of placing it to the exteme left in the main report
The output is uploaded here in this link
https://drive.google.com/file/d/117lFxIBE34gVdl7WkaG9Y_G_3f-Vx79l/view?usp=sharing

Field not found in report

I try to create a JasperReport's report with charts but getting error. I used table in the report and pie chart. Where I did wrong ?
I want to use same fields for reports and charts but I don't know how to use in both components.
Error:
Fields not found : campaignName
Fields not found : numTransmissions
<?xml version="1.0" encoding="UTF-8"?>
<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="template_Table" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoPages" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<subDataset name="Dataset1">
<queryString>
<![CDATA[]]>
</queryString>
</subDataset>
<field name="campaignName" class="java.lang.String"/>
<field name="numTransmissions" class="java.lang.Integer"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
</group>
<group name="Group2">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression>
</group>
<detail>
<band height="449" splitType="Stretch">
<componentElement>
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="800" height="199" forecolor="#FFFFFF" backcolor="#424242">
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Dataset1"/>
<jr:column width="52">
<jr:tableHeader height="70">
<staticText>
<reportElement x="0" y="0" width="52" height="70"/>
<box leftPadding="3"/>
<textElement textAlignment="Left" verticalAlignment="Middle" markup="html">
<font fontName="Verdana" size="9"/>
</textElement>
<text><![CDATA[Campaign Name]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="50">
<textField>
<reportElement x="0" y="0" width="52" height="50"/>
<box leftPadding="6"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Verdana"/>
</textElement>
<textFieldExpression><![CDATA[$F{campaignName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="53">
<jr:tableHeader height="70">
<staticText>
<reportElement x="0" y="0" width="53" height="70"/>
<box leftPadding="3"/>
<textElement textAlignment="Left" verticalAlignment="Middle" markup="html">
<font fontName="Verdana" size="9"/>
</textElement>
<text><![CDATA[Email Transmissions]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="50">
<textField>
<reportElement x="0" y="0" width="53" height="50"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{numTransmissions}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<summary>
<band height="400" splitType="Stretch">
<pieChart>
<chart evaluationTime="Report">
<reportElement x="135" y="0" width="270" height="300"/>
<chartTitle>
<titleExpression><![CDATA["My First JR Pie Chart"]]></titleExpression>
</chartTitle>
<chartSubtitle/>
<chartLegend/>
</chart>
<pieDataset>
<keyExpression><![CDATA[$F{campaignName}]]></keyExpression>
<valueExpression><![CDATA[$F{numTransmissions}]]></valueExpression>
</pieDataset>
<piePlot>
<plot/>
<itemLabel/>
</piePlot>
</pieChart>
</band>
</summary>
</jasperReport>

Jasper SubReport doesnt' show in Master

I asked a similar question a year ago and didn't discover a resolution. The subreport I am working on now is in the detail band of the master, although I did try it in others just in case.
<detail>
<band height="34" splitType="Stretch">
<subreport>
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" mode="Transparent" x="0" y="0" width="555" height="34" uuid="6318f4b9-c420-4294-a63f-1a83d338f755">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="item_id">
<subreportParameterExpression><![CDATA[$F{item_id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["report.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
I checked the path to the subreport is correct. In the subreport the parameter_name is exactly the same. The .jasper file is compiled successfully.
The master report has a call to a stored procedure, and I am using one of the fields it is returning as the subreport parameter. I called it 'item_id' here. I used the wizard to map that to the subreport parameter with the same name. The idea is that the subreport should return additional information about each of the item_ids returned by the SP in the master report.
When I run the subreport on it's own it returns data for a particular item_id. I created a variable in the master to track how many rows the SP itself returns and when I run the master it shows the correct number of rows exist but no data displays on the master report. It also leaves enough empty space to appear to indicate that something is being returned but just not displayed. When I set 'remove line when blank' for the subreport element in properties from the master report I get no rows - so apparently it is returning a blank line 44 times - one for each row. Or is it?
One suggestion was to remove the connection_expression and replace it with parameters_map_expression but that didn't help either.
My best guess is that the subreport data is not getting to the master for some reason. If anyone has any suggestions I am open to anything I can do with JasperSoftStudio 6.3.
Master report:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 -->
<!-- 2016-09-07T10:21:37 -->
<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="ITEMMRPT" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1aa96e89-cb24-464e-90bf-0d12bc48a516">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="staging"/>
<parameter name="billing_year" class="java.lang.Integer">
<defaultValueExpression><![CDATA[2015]]></defaultValueExpression>
</parameter>
<parameter name="billing_month" class="java.lang.Integer">
<defaultValueExpression><![CDATA[9]]></defaultValueExpression>
</parameter>
<parameter name="billing_day" class="java.lang.Integer">
<defaultValueExpression><![CDATA[1]]></defaultValueExpression>
</parameter>
<parameter name="report_type" class="java.lang.String">
<defaultValueExpression><![CDATA["DAILY"]]></defaultValueExpression>
</parameter>
<parameter name="area_cd" class="java.lang.String">
<defaultValueExpression><![CDATA["TACM"]]></defaultValueExpression>
</parameter>
<queryString language="SQL">
<![CDATA[exec createitembillingReport;1 #billing_year = $P{billing_year}, #billing_month = $P{billing_month}, #billing_day = $P{billing_day},#report_type=$P{report_type},#area_cd = $P{area_cd}]]>
</queryString>
<field name="item_id" class="java.lang.String"/>
<field name="item_name" class="java.lang.String"/>
<variable name="total" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{item_id}]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="67">
<staticText>
<reportElement x="60" y="33" width="242" height="17" uuid="06a14aaf-07b9-4894-bc60-0f5b3b254826">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="11"/>
</textElement>
<text><![CDATA[Item Listing]]></text>
</staticText>
<staticText>
<reportElement x="60" y="50" width="78" height="17" uuid="365238e1-9e5f-471b-92aa-aadab4fcfc31">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Billable as of :]]></text>
</staticText>
<textField>
<reportElement x="138" y="50" width="180" height="17" uuid="c735ec59-4e96-4b22-bf70-08af130efed9"/>
<textElement>
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{billing_month}+"/"+$P{billing_day}+"/"+$P{billing_year}]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="18">
<staticText>
<reportElement x="16" y="0" width="70" height="17" uuid="79476ab9-e5ea-40ec-b382-b22a0c5d355a">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Item ID]]></text>
</staticText>
<staticText>
<reportElement x="479" y="0" width="61" height="17" uuid="adb588f3-ed71-439a-acde-d812acee6a94">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Location]]></text>
</staticText>
<staticText>
<reportElement x="260" y="0" width="97" height="17" uuid="243ce68e-c532-4056-958e-08f7a0f83d2a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Pull Date]]></text>
</staticText>
<staticText>
<reportElement x="89" y="0" width="87" height="17" uuid="ca299eb7-2aba-4529-ae76-3dfa4c6abe29">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Order Date]]></text>
</staticText>
<staticText>
<reportElement x="380" y="0" width="86" height="17" uuid="c220e72b-bd29-416a-95fc-c6c8a10ab081">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Ship Date]]></text>
</staticText>
<staticText>
<reportElement x="168" y="0" width="92" height="17" uuid="2ea414c5-4484-48dc-a6b5-52d4ab3ebd97">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Description]]></text>
</staticText>
<line>
<reportElement x="0" y="17" width="555" height="1" uuid="ab7d193f-96d3-454a-8fdd-5e0027425d42">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<subreport>
<reportElement isPrintRepeatedValues="false" mode="Transparent" x="0" y="4" width="555" height="16" uuid="6318f4b9-c420-4294-a63f-1a83d338f755">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="item_id">
<subreportParameterExpression><![CDATA[$F{item_id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["report.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement x="10" y="-1" width="100" height="16" uuid="91285585-7366-46c3-b248-9dbaf0c80839"/>
<textFieldExpression><![CDATA[$F{item_id}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="15">
<textField>
<reportElement x="110" y="0" width="100" height="15" uuid="54e9321a-c062-49f4-8b32-02f4c41458c0"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="210" y="0" width="100" height="15" uuid="00b215e9-ba28-413b-ad44-4c4a3aac7fdd"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="400" y="-1" width="50" height="15" uuid="0dae2a30-28fe-4a71-9dc9-ec906ec05c78"/>
<text><![CDATA[Run Date :]]></text>
</staticText>
<textField pattern="MMMMM dd, yyyy">
<reportElement x="450" y="1" width="100" height="13" uuid="34cfa033-e43d-4668-852d-3019f322ea5a"/>
<textFieldExpression><![CDATA[new SimpleDateFormat("MMM dd, yyyy").format(TODAY())]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="18">
<textField>
<reportElement x="120" y="2" width="50" height="16" uuid="4a336320-9341-42dd-98c4-1cec2c2d6a15"/>
<textFieldExpression><![CDATA[$V{total}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="10" y="2" width="100" height="13" uuid="00887a5b-9421-402b-98b8-b041f08959f0">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<text><![CDATA[Total Items]]></text>
</staticText>
</band>
</summary>
Subreport:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 -->
<!-- 2016-09-07T10:37:50 -->
<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="report" pageWidth="555" pageHeight="802" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="9014add6-11f0-4647-97ec-9b9f3f78afce">
<parameter name="item_id" class="java.lang.String" isForPrompting="false"/>
<queryString language="SQL">
<![CDATA[select b.item_id,
b.order_dt,
cpnv.item_desc,
cpnv.pull_dt,
b.ship_dt,
location = (select bjc.location_cd
from warehouse_location bjc
where bjc.item = b.item_id
and bjc.location_start_dt =
(select max(location_start_dt)
from warehouse_location
where item_id = b.item_id))
from item_names cpnv
join items b
ON cpnv.sub_id = b.sub_id
where (ship_dt is null or ship_dt >= '1-24-16 22:00')
and b.item_id = $P{item_id}]]>
</queryString>
<field name="item_id" class="java.lang.String"/>
<field name="order_dt" class="java.sql.Timestamp"/>
<field name="item_desc" class="java.lang.String"/>
<field name="pull_dt" class="java.sql.Timestamp"/>
<field name="ship_dt" class="java.sql.Timestamp"/>
<field name="location" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="41" splitType="Stretch">
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="9" y="11" width="67" height="20" isPrintWhenDetailOverflows="true" uuid="12d147f8-532b-4ed5-a249-e03661099e4f">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{item_id}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="89" y="11" width="78" height="20" isPrintWhenDetailOverflows="true" uuid="76ea3e37-9b7a-44e3-a1ae-5850072b90ef">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy hh:mm").format($F{order_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="168" y="11" width="156" height="20" isPrintWhenDetailOverflows="true" uuid="9ab7bd73-e633-4d51-8271-00c673750a38">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{item_desc}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="326" y="11" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="b0ac4ef7-e951-4fb2-ab80-3b6dc3103764">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy").format($F{pull_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="380" y="11" width="69" height="20" isPrintWhenDetailOverflows="true" uuid="83cb0048-4b23-42a9-a48d-63501a9f242d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yy hh:mm").format($F{ship_dt})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Band" isBlankWhenNull="false">
<reportElement x="479" y="11" width="54" height="20" isPrintWhenDetailOverflows="true" uuid="67a5bd0d-cd6d-4910-83d0-396fc36781d3">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{location}]]></textFieldExpression>
</textField>
</band>
</detail>
I changed some of the names of things for proprietary reasons. Hopefully they are consistent. If something doesn't jive it was probably lost in translation.
As noted the query works fine in the subreport. When i give it one of the item_ids from the procedure in the master report it displays all the fields correctly for that item. It just won't come through to the master report.
You could try to print the subreport parameter $P{item_id} in the title band of the subreport to check if the parameter passing works correctly.
Depending on the height of the main reports detail band, Maybe you have to remove the top and bottom margin of the subreport.

One excel Sheet for each subreport (No groups in the main report)jaspersoft iReport

This is really driving me mad.. I read everywhere but still can't understand why mine isn't working
I have a main report( a dummy query returning me only one row) and 2 subreports(each with its own header) found in two different detail band. The second subreport splits into multiple excel sheets!
The main report doesn't contain any groups.. its just a dummy query and has no links with the subreports.
This is what i did in the main report:
Add in Properties : Name="net.sf.jasperreports.export.xls.one.page.per.sheet " with Value="True"
Set Ignore Pagination="True"
Added a Line element and set the Properties Expression: Name="net.sf.jasperreports.export.xls.break.after.row" and Default Value="True"
Then for the second subreport:
Set Ignore Pagination="True"
I just want one excel sheet for each subreports. But the second subreport is being split to multiple sheets... :(
Does anybody know what's the problem...?
I also read an issue with ignore pagination and page breaks here:
http://community.jaspersoft.com/ireport-designer/issues/2575
I am using the Jaspersoft iReport Designer 5.0.1
======================================
My jrxml for the main report:
<?xml version="1.0" encoding="UTF-8"?>
<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="Sample_Report28022013" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true" uuid="1808a381-4204-4662-9cc0-7d154bcc0890">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="ireport.jasperserver.reportUnit" value="/reports/Test/Subreports"/>
<property name="ireport.jasperserver.url" value="http://192.168.17.114:8080/jasperserver/services/repository"/>
<property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="True"/>
<property name="net.sf.jasperreports.export.html.remove.emtpy.space.between.rows" value="True"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["C:\\Documents and Settings\\TreshmaC\\Desktop\\WCHY\\JasperSoft\\"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT
tableliste."ident" AS tableliste_ident
FROM
"public"."tableliste" tableliste
LIMIT 1]]>
</queryString>
<field name="tableliste_ident" class="java.lang.Integer"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="7" splitType="Stretch"/>
</title>
<pageHeader>
<band height="5" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="7" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="97" splitType="Stretch">
<subreport>
<reportElement uuid="ea3a0ff6-f82f-43c0-8c7b-3d06e699f2f0" x="0" y="0" width="555" height="75"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["repo:Sample_Report28022013_subreport1.jrxml"]]></subreportExpression>
</subreport>
<break>
<reportElement uuid="3568174b-2ea9-4973-8e12-adcb7f54685a" x="0" y="83" width="100" height="1"/>
</break>
</band>
<band height="94" splitType="Prevent">
<subreport>
<reportElement uuid="b6ab1daa-122a-4a4b-8f60-f9fe2ba78204" x="0" y="13" width="555" height="72">
<property name="net.sf.jasperreports.export.xls.break.before.row" value="True"/>
</reportElement>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["repo:Sample_Report28022013_subreport2.jrxml"]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band height="7" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="7" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="203" splitType="Stretch">
<componentElement>
<reportElement uuid="2651da09-f5ff-45de-91cb-6d9f0a8af724" x="0" y="0" width="555" height="200"/>
<mp:map xmlns:mp="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<mp:latitudeExpression><![CDATA[37.7750f]]></mp:latitudeExpression>
<mp:longitudeExpression><![CDATA[-122.4183f]]></mp:longitudeExpression>
</mp:map>
</componentElement>
</band>
</summary>
</jasperReport>
==================================================
jrxml file for the second subreport:
<?xml version="1.0" encoding="UTF-8"?>
<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="Sample_Report28022013_subreport2" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isIgnorePagination="true" uuid="5a86bc51-7425-4897-b74c-0dcf7016c666">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="ireport.jasperserver.reportUnit" value="/reports/Test/Subreports"/>
<property name="ireport.jasperserver.url" value="http://192.168.17.114:8080/jasperserver/services/repository"/>
<property name="net.sf.jasperreports.export.html.remove.emtpy.space.between.rows" value="True"/>
<queryString>
<![CDATA[SELECT
ad_dcr."id_client" AS ad_dcr_id_client,
ad_dcr."detail_obj_dem" AS ad_dcr_detail_obj_dem,
ad_dcr."cre_mnt_octr" AS ad_dcr_cre_mnt_octr,
ad_dcr."cre_mnt_deb" AS ad_dcr_cre_mnt_deb,
ad_cli."id_client" AS ad_cli_id_client,
ad_cli."num_port" AS ad_cli_num_port,
ad_cli."pp_prenom" AS ad_cli_pp_prenom,
ad_cli."pays" AS ad_cli_pays,
ad_cli."email" AS ad_cli_email,
ad_cli."pp_nom" AS ad_cli_pp_nom
FROM
"public"."ad_cli" ad_cli LEFT JOIN "public"."ad_dcr" ad_dcr ON ad_cli."id_client" = ad_dcr."id_client"
ORDER BY ad_cli."id_client"]]>
</queryString>
<field name="ad_dcr_id_client" class="java.lang.Integer"/>
<field name="ad_dcr_detail_obj_dem" class="java.lang.String"/>
<field name="ad_dcr_cre_mnt_octr" class="java.math.BigDecimal"/>
<field name="ad_dcr_cre_mnt_deb" class="java.math.BigDecimal"/>
<field name="ad_cli_id_client" class="java.lang.Integer"/>
<field name="ad_cli_num_port" class="java.lang.String"/>
<field name="ad_cli_pp_prenom" class="java.lang.String"/>
<field name="ad_cli_pays" class="java.lang.Integer"/>
<field name="ad_cli_email" class="java.lang.String"/>
<field name="ad_cli_pp_nom" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="23" splitType="Stretch"/>
</title>
<pageHeader>
<band height="43" splitType="Stretch">
<staticText>
<reportElement uuid="a071e7c5-1a11-497b-9eee-6b243a947965" x="378" y="0" width="177" height="39"/>
<textElement textAlignment="Right">
<font fontName="Castellar" size="26"/>
</textElement>
<text><![CDATA[DCR ]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="22" splitType="Stretch">
<frame>
<reportElement uuid="12e8ca58-2196-4a8a-9137-c5104e63a485" mode="Opaque" x="0" y="0" width="555" height="20" backcolor="#006666"/>
</frame>
<staticText>
<reportElement uuid="a1b68cab-e347-4a8f-87f8-01064a78854f" x="12" y="0" width="100" height="20" forecolor="#FFFFFF"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Client ID]]></text>
</staticText>
<staticText>
<reportElement uuid="8a1870d5-2682-45a1-bf8b-31a613028daf" x="312" y="0" width="143" height="20" forecolor="#FFFFFF"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Achat]]></text>
</staticText>
<staticText>
<reportElement uuid="df37206c-95bf-4d03-8add-3fc7ca1d07a9" x="455" y="0" width="100" height="20" forecolor="#FFFFFF"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<text><![CDATA[Montant]]></text>
</staticText>
<staticText>
<reportElement uuid="40e2dded-de55-4692-8e8d-2e94127dd28e" x="112" y="0" width="100" height="20" forecolor="#FFFFFF"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Nom]]></text>
</staticText>
<staticText>
<reportElement uuid="45abf217-95a0-4ef4-963b-45c2915e5723" x="212" y="0" width="100" height="20" forecolor="#FFFFFF"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Pays]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="26" splitType="Stretch">
<textField>
<reportElement uuid="7f43f0d2-fcc2-45b3-865e-02d643954c1c" x="12" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{ad_dcr_id_client}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c14584b6-c516-423a-ac17-bc4ffeb7d74c" x="312" y="0" width="143" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{ad_dcr_detail_obj_dem}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement uuid="88cb8587-2e82-4ea6-9c1d-f53767ffb93c" x="455" y="0" width="100" height="20"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{ad_dcr_cre_mnt_deb}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f4feb876-fbb5-4b7b-b9fb-f24528dfb762" x="112" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{ad_cli_pp_nom}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="5fed5609-a23b-4cbe-a4b2-a0ebf36e3cd5" x="212" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{ad_cli_pays}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="6eb43b44-1a3f-4b05-be37-4caeb35e5feb" x="0" y="20" width="555" height="1"/>
</line>
</band>
</detail>
<columnFooter>
<band height="7" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="8" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="7" splitType="Stretch"/>
</summary>
</jasperReport>
I think You can just set the size of a page in main and sub reports to some very large value, for example 999999 and insert "page break" from pallete between sub-reports.
This way You should get each subreport in different page, but second one should not span across multiple pages.
You don´t need to do anthing in the Main. It´s all in the subreports. For example the main:
<detail>
<band height="397">
<subreport>
<reportElement positionType="Float" x="0" y="298" width="801" height="99" uuid="61789fb8-f34c-46d4-a13e-6cfeba5567a7">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["repo:"]]></subreportExpression>
</subreport>
<subreport>
<reportElement positionType="Float" x="0" y="298" width="801" height="99" uuid="61789fb8-f34c-46d4-a13e-6cfeba5567a7">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["repo:"]]></subreportExpression>
</subreport>
</band>
</detail>
And use in the last element you have (like a textfield) a BreakAfter:
<textField isBlankWhenNull="true">
<reportElement x="280" y="0" width="120" height="30" uuid="632a6ed9-70ce-4ecd-a3e0-aaec6af95aa9">
<property name="net.sf.jasperreports.export.xls.break.after.row" value="true"/>
<property name="net.sf.jasperreports.export.xls.sheet.name" value="Nombre y apellidos"/>
</reportElement>
<box>
<topPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["TOTAL"]]></textFieldExpression>
</textField>
This sould be placed at the end of your report