У меня есть отчет, который использовался более 10 лет в некоторых приложениях.
При обновлении до любой версии библиотеки JaseperReports> = 6.2.2 вертикальное выравнивание сильно нарушено (в большинстве случаев, не всегда).
6.2.1:
6.2.2:
Вот соответствующая часть моего источника отчета:
<group name="invoiceIdGroup" isStartNewPage="true">
<groupExpression><![CDATA[$F{id}]]></groupExpression>
<groupHeader>
<band height="184" splitType="Stretch">
<textField isBlankWhenNull="true">
<reportElement key="textField" x="0" y="137" width="505" height="30" uuid="0d38b823-8fc5-4a5d-b49c-fc193e073874"/>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement key="textField" x="126" y="54" width="148" height="18" uuid="5e6904a9-46c9-4f2e-85a0-643246c93b11"/>
<box topPadding="2" leftPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textFieldExpression><![CDATA[$F{invoiceDate}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement key="textField" x="126" y="72" width="148" height="18" uuid="f35901b0-c118-4f69-aa00-770505271ab8"/>
<box topPadding="2" leftPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textFieldExpression><![CDATA[$F{echeance}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement key="textField" x="126" y="108" width="148" height="18" uuid="02715d59-826b-4599-9cba-1838c7e963d5"/>
<box topPadding="2" leftPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textFieldExpression><![CDATA[$F{customer}.getNom()]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="staticText-2" x="6" y="54" width="120" height="18" uuid="c6974521-97dc-465c-87d3-d45be2b18f22"/>
<box topPadding="2" leftPadding="4" rightPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right"/>
<text><![CDATA[Date document]]></text>
</staticText>
<staticText>
<reportElement key="staticText-3" x="6" y="72" width="120" height="18" uuid="dd9a6787-86cf-4619-a7f4-39b4c3f57bf9"/>
<box topPadding="2" leftPadding="4" rightPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right"/>
<text><![CDATA[Date échéance]]></text>
</staticText>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement key="textField-4" x="126" y="90" width="148" height="18" uuid="9533a2e6-1c91-49eb-8007-ab77faa3b9dc"/>
<box topPadding="2" leftPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textFieldExpression><![CDATA[$F{numero}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="staticText-4" x="6" y="108" width="120" height="18" uuid="bf604c85-83e4-4653-a495-154960474a87"/>
<box topPadding="2" leftPadding="4" rightPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right"/>
<text><![CDATA[Réf. customer]]></text>
</staticText>
<staticText>
<reportElement key="staticText-5" x="6" y="90" width="120" height="18" uuid="a39ef932-26ae-4788-b312-b0407f8bafbe"/>
<box topPadding="2" leftPadding="4" rightPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right"/>
<text><![CDATA[N° document]]></text>
</staticText>
<textField isBlankWhenNull="false">
<reportElement key="textField-5" x="315" y="0" width="179" height="36" uuid="e9ee7f81-5b04-4da9-9f7b-3026f19528a9"/>
<box leftPadding="4"/>
<textElement verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{customer}.getNom()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-6" x="315" y="36" width="179" height="14" uuid="760c796b-2c2c-4266-83e0-c342a92c2b4e"/>
<box leftPadding="4"/>
<textFieldExpression><![CDATA[$F{customer}.getAdresse()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-7" x="315" y="50" width="179" height="14" uuid="f87a0c2b-1b5f-4640-8cd3-ed90ef4b78d5"/>
<box leftPadding="4"/>
<textFieldExpression><![CDATA[$F{customer}.getCodePostal() + " " + $F{customer}.getLocalite()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-8" x="315" y="76" width="179" height="14" uuid="60cf1420-102f-4a8d-b247-109a3f34b67f"/>
<box leftPadding="4"/>
<textFieldExpression><![CDATA["TVA : " + $F{customer}.getNumeroTVA()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-9" x="6" y="24" width="268" height="30" uuid="b500a578-e63e-449e-b4be-7324550ea3b4"/>
<box leftPadding="4">
<pen lineWidth="1.0"/>
<topPen lineWidth="0.0" lineStyle="Double"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0" lineStyle="Double"/>
<rightPen lineWidth="0.0" lineStyle="Double"/>
</box>
<textElement>
<font size="18"/>
</textElement>
<textFieldExpression><![CDATA[$F{creditNote} ? "Note de crédit" : "Facture"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-7" x="315" y="64" width="179" height="14" uuid="3d76053d-71af-4b87-92c0-eb7c1011dda2">
<printWhenExpression><![CDATA[!$F{customer}.getCountry().equals($F{customer}.getTrustee().getCountry())]]></printWhenExpression>
</reportElement>
<box leftPadding="4"/>
<textFieldExpression><![CDATA[$F{customer}.getCountry().getNameFr()]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField" x="0" y="167" width="505" height="17" isRemoveLineWhenBlank="true" uuid="831804e4-c455-4c27-b689-cccb152bffc8">
<printWhenExpression><![CDATA[$F{intraVat}]]></printWhenExpression>
</reportElement>
<textElement markup="none">
<font size="10"/>
</textElement>
<text><![CDATA[AUTOLIQUIDATION]]></text>
</staticText>
</band>
</groupHeader>
<groupFooter>
<band height="119" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement key="textField" stretchType="RelativeToTallestObject" x="0" y="48" width="505" height="18" uuid="41123314-1928-4c4e-9e59-23fb0e09b423"/>
<textFieldExpression><![CDATA[$F{remarque}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
<reportElement key="textField-3" positionType="FixRelativeToBottom" x="0" y="66" width="505" height="35" uuid="11439e87-82bc-4003-a7a2-b2a4ad02072e">
<printWhenExpression><![CDATA[!$F{creditNote}]]></printWhenExpression>
</reportElement>
<textElement markup="html">
<font isBold="true" isItalic="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[($F{compte} != null ? "Veuillez payer sur le compte <i> IBAN " + $F{compte}.getIban() + ($F{compte}.getBic() != null ? " - " + $F{compte}.getBic() : "" ) + "</i> avec la référence " : "Référence payement : ") + "<i>" + $F{communication} + "</i> pour le " + new SimpleDateFormat("dd/MM/yyyy").format($F{echeance}) + "."]]></textFieldExpression>
</textField>
<elementGroup>
<textField pattern="##0.00 €" isBlankWhenNull="false">
<reportElement key="textField" positionType="FixRelativeToBottom" x="425" y="20" width="80" height="20" uuid="2285d046-8901-4393-9e19-ab05af954579"/>
<box topPadding="2" rightPadding="4">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{tvac}]]></textFieldExpression>
</textField>
<textField pattern="##0.00 €" isBlankWhenNull="false">
<reportElement key="textField" positionType="FixRelativeToBottom" x="265" y="20" width="80" height="20" uuid="fdac7982-8977-4a44-bc1d-e3d8451917ce"/>
<box topPadding="2" rightPadding="4">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{htva}]]></textFieldExpression>
</textField>
<textField pattern="##0.00 €" isBlankWhenNull="false">
<reportElement key="textField-1" positionType="FixRelativeToBottom" x="345" y="20" width="80" height="20" uuid="3768a45d-b758-4bc7-958d-5b7723ab840c"/>
<box topPadding="2" rightPadding="4">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{tvac}.subtract($F{htva})]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="staticText-9" positionType="FixRelativeToBottom" x="265" y="0" width="80" height="20" uuid="ded844bf-73aa-4013-a3d9-2136e587cb07"/>
<box>
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Center">
<font size="12" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<text><![CDATA[Total HTVA]]></text>
</staticText>
<staticText>
<reportElement key="staticText-10" positionType="FixRelativeToBottom" x="345" y="0" width="80" height="20" uuid="45b20ae0-bbb7-43d9-9d17-9c1c5965af65"/>
<box>
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0" lineStyle="Solid"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Center">
<font size="12" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<text><![CDATA[TVA]]></text>
</staticText>
<textField>
<reportElement key="staticText-11" positionType="FixRelativeToBottom" x="425" y="0" width="80" height="20" uuid="567f7831-4fdc-4c93-8f16-b8ca447cf1a7"/>
<box>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" markup="none">
<font size="12" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{creditNote} ? "À recevoir" : "À payer"]]></textFieldExpression>
</textField>
</elementGroup>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement key="textField" x="6" y="2" width="148" height="18" forecolor="#FFFFFF" uuid="db4de445-082b-4150-9f63-e544cb857df7"/>
<box leftPadding="4">
<pen lineWidth="0.25" lineStyle="Solid"/>
<topPen lineWidth="0.25" lineStyle="Solid"/>
<leftPen lineWidth="0.25" lineStyle="Solid"/>
<bottomPen lineWidth="0.25" lineStyle="Solid"/>
<rightPen lineWidth="0.25" lineStyle="Solid"/>
</box>
<textFieldExpression><![CDATA[$F{echeance}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField" stretchType="RelativeToTallestObject" x="0" y="101" width="505" height="18" isRemoveLineWhenBlank="true" forecolor="#FF3333" uuid="50a622ed-c935-4a3c-a80d-38aaadfc2ad6">
<printWhenExpression><![CDATA[$F{directDebit}]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" markup="none">
<font isBold="true"/>
</textElement>
<text><![CDATA[Cette facture sera encaissée par domiciliation.]]></text>
</staticText>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band height="68" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<printWhenExpression><![CDATA[!$F{tasks}.isEmpty()]]></printWhenExpression>
<subreport isUsingCache="true">
<reportElement key="subreport-1" stretchType="RelativeToBandHeight" x="0" y="0" width="505" height="20" isPrintWhenDetailOverflows="true" uuid="27c37e34-0af8-4de7-b46b-508651dcc209"/>
<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{tasks})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{taskReport}]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band splitType="Stretch"/>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>