Q: Band height validation I have a main report which contains a page header, a page footer and one subreport. By adding the subreport, I am trying to see the report preview, but I am getting the follow error:

This is the main report source:
<?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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="718917f5-ce2c-4bb8-a120-bc3d0f9dde5b">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <pageHeader>
        <band height="88">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <image>
                <reportElement x="0" y="0" width="275" height="67" uuid="4a20ebd1-a248-4e7c-aa3d-554dab14cb0c">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <imageExpression><![CDATA["vitanuova.png"]]></imageExpression>
            </image>
            <staticText>
                <reportElement x="0" y="68" width="230" height="20" uuid="aeae19c7-14b5-409e-b5e2-8dc7891b7156"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans" size="6"/>
                </textElement>
                <text><![CDATA[Sede Legale e Direzione Generale: Via Torricelli, 37 – 37136 VERONA
Telefono +39 045 4937515   E-mail: info@vitanuova.eu   Sito web: www.vitanuova.eu                                                                               
]]></text>
            </staticText>
        </band>
    </pageHeader>
    <detail>
        <band height="28">
            <subreport>
                <reportElement positionType="Float" x="0" y="0" width="555" height="28" uuid="3c5f744e-bdb6-4de9-bd5e-ab4f47e7590b">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                <subreportExpression><![CDATA["ConferimIncarico_p1_2.jasper"]]></subreportExpression>
            </subreport>
        </band>
    </detail>
    <pageFooter>
        <band height="159">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <image hAlign="Right" vAlign="Bottom">
                <reportElement positionType="Float" x="411" y="1" width="145" height="158" uuid="a26766a4-dea2-4dcc-a66d-a7a1732f10d4">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <imageExpression><![CDATA["vita2.png"]]></imageExpression>
            </image>
            <staticText>
                <reportElement x="0" y="102" width="230" height="30" uuid="cdc0e65a-069b-4378-a44c-62e7a6b0298d"/>
                <textElement>
                    <font fontName="DejaVu Sans" size="6"/>
                </textElement>
                <text><![CDATA[Vitanuova S.r.l.
Iscrizione al Registro delle Imprese di Verona al n. VR-413154
Iscrizione al Registro Unico degli Intermediari Assicurativi al n. B000 
Codice fiscale e Part. IVA 04352620233 | PEC: vitanuova-srl@legalmail.it
]]></text>
            </staticText>
            <line>
                <reportElement x="0" y="79" width="230" height="1" forecolor="#F0222F" uuid="93c2bc81-2be7-4290-9248-346d2c866f0f">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <graphicElement>
                    <pen lineWidth="3.0" lineColor="#E61220"/>
                </graphicElement>
            </line>
            <staticText>
                <reportElement x="0" y="31" width="79" height="19" uuid="17156115-6056-4173-9b6a-f03c337b0615">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textElement>
                    <font fontName="DejaVu Sans" size="8"/>
                </textElement>
                <text><![CDATA[www.vitanuova.eu]]></text>
            </staticText>
        </band>
    </pageFooter>
</jasperReport>

This is the subreport source:
<?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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="718917f5-ce2c-4bb8-a120-bc3d0f9dde5b">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <detail>
        <band height="480" splitType="Stretch">
            <textField>
                <reportElement x="30" y="28" width="500" height="99" uuid="2e391c55-c8b1-4c1d-a0cf-005a4ae4f57e"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans"/>
                    <paragraph lineSpacing="Double"/>
                </textElement>
                <textFieldExpression><![CDATA["in considerazione degli accordi con Lei intervenuti, a seguito del Suo interessamento per l'attività svolta da Codesta Società, con riferimento allo svolgimento della Sua attività di Intermediario Assicurativo iscritto alla sezione E del Registro Unico degli Intermediari Assicurativi istituito dall'ISVAP in applicazione delle norme contenute nel d.lgs. 7 settembre 2005 n. 209, Le chiediamo di restituirci copia del contratto di seguito riportato, debitamente sottoscritto ai sensi di legge."]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="30" y="143" width="500" height="20" uuid="904b5464-14e8-4c70-aab1-a88b5ed654fe"/>
                <textElement textAlignment="Center">
                    <font fontName="DejaVu Sans" isBold="true"/>
                </textElement>
                <text><![CDATA[CONFERIMENTO DI INCARICO DI COLLABORAZIONE ]]></text>
            </staticText>
            <textField>
                <reportElement x="30" y="6" width="500" height="22" uuid="08a54103-0c49-459e-ab13-f9e1883a050b"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans"/>
                    <paragraph lineSpacing="Double"/>
                </textElement>
                <textFieldExpression><![CDATA["Egr. sig./sig.ra"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="177" width="500" height="60" uuid="22d4096f-eea3-482b-b6bc-b058f1474b91"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans"/>
                    <paragraph lineSpacing="Double"/>
                </textElement>
                <textFieldExpression><![CDATA["Premesso che il presente contratto (di seguito lettera di nomina) disciplina i rapporti fra VitaNuova S.r.l., Intermediario Assicurativo iscritto alla sezione B del RUI al n. B000528716 (di seguito «Broker») e il/la signor/a  , Intermediario Assicurativo iscritto alla sezione E del RUI (di seguito «Collaboratore») "]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="240" width="500" height="18" uuid="7a4acadf-e332-4329-98c4-eda5ed18c8f7"/>
                <textElement textAlignment="Center">
                    <font fontName="DejaVu Sans"/>
                </textElement>
                <textFieldExpression><![CDATA["tutto ciò premesso e precisato"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="262" width="500" height="30" uuid="eb368d5d-9b51-4c22-93ed-5f3d21928036"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans"/>
                    <paragraph lineSpacing="Double"/>
                </textElement>
                <textFieldExpression><![CDATA["tra le Parti del presente contratto si conviene che lo stesso regolamenta l'incarico di nostro Collaboratore alle seguenti condizioni. "]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="292" width="500" height="18" uuid="6fe05484-4caf-4290-a4ed-dac66d1c28b3"/>
                <textElement textAlignment="Center">
                    <font fontName="DejaVu Sans" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["Articolo1"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="312" width="500" height="18" uuid="7df88912-d78a-489c-8fe9-a2c031af396d"/>
                <textElement textAlignment="Center">
                    <font fontName="DejaVu Sans" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["Oggetto"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="30" y="332" width="500" height="146" uuid="5f49dd73-0d07-4cbb-a797-126f37358293"/>
                <textElement textAlignment="Justified">
                    <font fontName="DejaVu Sans"/>
                    <paragraph lineSpacing="Double"/>
                </textElement>
                <textFieldExpression><![CDATA["1.1 Con la presente lettera di nomina, Le viene conferito l'incarico di nostro Collaboratore, in quanto iscritto al Registro degli Intermediari di assicurazione, Sezione E, di cui al Decreto Legislativo n. 209/2005 – Codice delle Assicurazioni Private – e al Regolamento ISVAP n. 5 del 16 ottobre 2006, con decorrenza dalla data d'iscrizione al Registro degli Intermediari in sez. E, per promuovere, sviluppare, conservare e gestire affari di assicurazione, relativi a prodotti, rami danni e rami vita, per i quali la Società VitaNuova S.r.l. eserciti attività di brokeraggio, ivi compreso il ritiro, per conto della Società, dei titoli di pagamento dei premi di assicurazione. "]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>

Does anyone could help me with this issue?

A: So your subreport element is 28 pixel high
<subreport>
            <reportElement positionType="Float" x="0" y="0" width="555" height="28" uuid="3c5f744e-bdb6-4de9-bd5e-ab4f47e7590b">

But your subreport is 842 pixel high
<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="718917f5-ce2c-4bb8-a120-bc3d0f9dde5b">

Have you tried decreasing the size of your subreport?
Subreports should generally not have any margins should mostly be limited to only the detail band.
The error could be, that JSS stretches the subreport-element to the subreport size which is 842+ pixel.
JSS will not automatically break the subreport to multiple chunks on different pages, so it will have an element which is bigger than one page.
