我有一个Jasper报告,其中有详细信息带2,其中列表以水平顺序显示。列表中有一个文本字段,该字段可扩展为true,因为它最多可以包含2000个字符。当文本变长时,即使可以将其容纳在同一页面中,也会在明细栏之后创建一个额外的空白页面。我想这是由于空间溢出到下一页。我在下面复制了jrxml。有没有一种方法可以消除由于空间原因而添加的空白页。还是空白页面的出现是由于其他原因?还是有更好的方法来设计报告。请指教。
<band height="125" splitType="Prevent">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<break>
<reportElement x="0" y="0" width="572" height="1" isRemoveLineWhenBlank="true" uuid="3e7ee00c-3924-49f8-8ed2-888f730a7443">
</reportElement>
</break>
<frame>
<reportElement x="0" y="1" width="572" height="124" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="PreventSplit" uuid="ef275a74-e8fc-4a40-a5e6-c02a44fa9d56">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
</reportElement>
<box padding="0"/>
<componentElement>
<reportElement style="Zebra" positionType="Float" x="0" y="0" width="572" height="124" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="PreventSplit" uuid="2de27357-dd7c-4385-abdf-2e28f05cc5ce">
</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="Horizontal">
<datasetRun subDataset="fboDetailsSet" uuid="ef5ce2cf-fffc-4d67-b177-7c33d206c17d">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("fboDetails")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="124" width="286">
<textField>
<reportElement x="0" y="0" width="260" height="17" forecolor="#F47822" uuid="4401c824-9d0d-40f5-96d9-829dc8fb3548">
</reportElement>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{icao} + "/" +$F{iata}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="17" width="260" height="13" forecolor="#F47822" uuid="59325618-1b6e-4698-bd34-548b05bd7432">
</reportElement>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{fbo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="30" width="260" height="13" forecolor="#0E202B" uuid="18af7716-3ac2-4578-ab2d-222bbe8611e4">
</reportElement>
<textElement>
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{domIntl} + ", " + $F{flightType} + ", " + $F{locationName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="43" width="260" height="13" forecolor="#0E202B" uuid="ee092c93-0af4-432c-973a-ae49d31fe072">
</reportElement>
<textElement>
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Effective: " + $F{priceEffectiveDate} + " | " + "Expiration: " + $F{priceExpirationDate}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="0" y="56" width="260" height="35" backcolor="#D3D7DA" uuid="a556a461-83a9-417d-8795-9b28af3aafa1">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
</reportElement>
<jr:table whenNoDataType="Blank">
<datasetRun subDataset="priceDetailsSet" uuid="ccaf74d3-3b48-42f8-9bb5-6336167c2451">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("priceDetails")]]></dataSourceExpression>
</datasetRun>
<jr:column width="92" uuid="fb82a65e-94de-4837-82b3-40dbee3b43e0">
<jr:columnHeader style="Table_CH" height="20" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="92" height="20" forecolor="#FFFFFF" uuid="5f0291c8-342f-4d60-9d26-2451a5febdae">
</reportElement>
<box>
<pen lineWidth="0.0"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
<paragraph firstLineIndent="4"/>
</textElement>
<text><![CDATA[Fuel Price Detail]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="15">
<textField>
<reportElement style="Zebra" mode="Opaque" x="0" y="0" width="92" height="15" uuid="244134cf-89dd-4875-8f3a-dd75594068f2">
</reportElement>
<box>
<pen lineWidth="0.0" lineColor="#3B393B"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
<paragraph firstLineIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{scaleFromQty} + "-" + $F{scaleToQty} + " USG"]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="88" uuid="54802c71-dd7b-428c-8f98-419783b86b17">
<jr:columnHeader style="Table_CH" height="20" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="88" height="20" forecolor="#FFFFFF" uuid="31d4e784-77d4-4592-b028-c257cc3f902e"/>
<box>
<pen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Fuel Price]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="15">
<textField>
<reportElement style="Zebra" mode="Opaque" x="0" y="0" width="88" height="15" uuid="7c14d0ac-5d21-4492-a66a-9408b18dc26c"/>
<box>
<pen lineWidth="0.0" lineColor="#3B393B"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{basePrice}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="80" uuid="8ca6d971-4c0a-45af-b6ab-aeb4db6c86e6">
<jr:columnHeader style="Table_CH" height="20" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="80" height="20" forecolor="#FFFFFF" uuid="37ff1dc0-668e-459f-8a01-a41c704ff60d"/>
<box>
<pen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Total Price]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="15">
<textField>
<reportElement mode="Opaque" x="0" y="0" width="80" height="15" forecolor="#FFFFFF" backcolor="#74828A" uuid="73c0075e-c3ce-4dce-8c95-640426e5e923"/>
<box>
<pen lineWidth="0.0" lineColor="#3B393B"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{totalPrice}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="0" y="93" width="260" height="10" forecolor="#0E202B" uuid="af1b3529-d466-417a-a151-4ab880cc9a26">
</reportElement>
<textElement>
<font size="7" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Notes: " + $F{minimumFees} + $F{publicNotes}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</frame>
</band>
溢出的文本字段为<textFieldExpression><![CDATA["Notes: " + $F{minimumFees} + $F{publicNotes}]]></textFieldExpression>