Jasper reports Jasper-空白的第一页

Jasper reports Jasper-空白的第一页,jasper-reports,Jasper Reports,我正在我的详细信息栏中插入一个表,但是如果该值在我的文本字段中太长,则该值仅显示在第二页中,因此第一页为空白 如何避免在Ireport上出现空白首页 下面是我的XML文件: <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLS

我正在我的详细信息栏中插入一个表,但是如果该值在我的文本字段中太长,则该值仅显示在第二页中,因此第一页为空白

如何避免在Ireport上出现空白首页

下面是我的XML文件:

    <?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="RelatorioLicenca" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="089efa24-5b40-467a-b66a-053b77756f0c">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <style name="table">
        <box>
            <pen lineWidth="0.0" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <subDataset name="dataset1" uuid="7664203f-829d-4951-8151-f0c3630108d3"/>
    <subDataset name="dataset2" uuid="b05d44f7-3dfe-4fb8-9014-34c037e8bc28"/>
    <subDataset name="dataset3" uuid="f3336d08-b905-45da-9cd2-871a08fbb704"/>
    <subDataset name="dataset4" uuid="8a31051f-53a0-4438-8f36-655294512ecb"/>
    <subDataset name="itemDataSet" uuid="07d68903-44a5-4148-9f4e-46a764459558">
        <field name="html" class="java.lang.String"/>
    </subDataset>
    <parameter name="LOGO_IMAGE" class="java.io.InputStream"/>
    <parameter name="BARRA_IMAGE" class="java.io.InputStream"/>
    <parameter name="listCriterioQci" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="73" splitType="Stretch">
            <image>
                <reportElement x="137" y="2" width="284" height="54" uuid="07b821b9-797c-439c-92e8-1963c63ee2ae"/>
                <imageExpression><![CDATA[$P{LOGO_IMAGE}]]></imageExpression>
            </image>
            <image>
                <reportElement x="0" y="59" width="555" height="14" uuid="4b071978-b491-4bdb-b964-77cc3e378966"/>
                <imageExpression><![CDATA[$P{BARRA_IMAGE}]]></imageExpression>
            </image>
        </band>
    </title>
    <detail>
        <band height="218" splitType="Stretch">
            <componentElement>
                <reportElement key="table" style="table" positionType="Float" isPrintRepeatedValues="false" mode="Opaque" x="2" y="8" width="553" height="197" isPrintWhenDetailOverflows="true" forecolor="#FFFFFF" uuid="086200b3-e8f8-454d-84ef-d91dbe233d92"/>
                <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="itemDataSet" uuid="376ddebe-37e7-49e4-9a3c-c12cdb054808">
                        <dataSourceExpression><![CDATA[$P{listCriterioQci}]]></dataSourceExpression>
                    </datasetRun>
                    <jr:column width="554" uuid="cc022176-90eb-4639-8818-85293cb2da05">
                        <jr:detailCell style="table" height="135" rowSpan="1">
                            <textField isStretchWithOverflow="true">
                                <reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="31" width="554" height="92" isPrintWhenDetailOverflows="true" uuid="75438790-5295-4508-b6fe-cae1b962ae1d"/>
                                <box>
                                    <pen lineStyle="Solid" lineColor="#FFFFFF"/>
                                    <topPen lineStyle="Solid" lineColor="#FFFFFF"/>
                                    <leftPen lineStyle="Solid" lineColor="#FFFFFF"/>
                                    <bottomPen lineStyle="Solid" lineColor="#FFFFFF"/>
                                    <rightPen lineStyle="Solid" lineColor="#FFFFFF"/>
                                </box>
                                <textElement markup="html"/>
                                <textFieldExpression><![CDATA[$F{html}]]></textFieldExpression>
                            </textField>
                            <line>
                                <reportElement positionType="Float" x="0" y="15" width="554" height="1" uuid="7a8ae78a-41c3-4612-aeff-4aa9bbfe74f5">
                                    <printWhenExpression><![CDATA[new Boolean($F{html} != null)]]></printWhenExpression>
                                </reportElement>
                            </line>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </detail>
    <pageFooter>
        <band height="21" splitType="Stretch">
            <textField>
                <reportElement mode="Opaque" x="342" y="4" width="170" height="13" uuid="26decbd6-15dd-4f66-99d7-132b5b54a889"/>
                <textElement textAlignment="Right"/>
                <textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement mode="Opaque" x="514" y="4" width="40" height="13" uuid="e34184f8-e277-4ec3-9a69-0c07d0729e25"/>
                <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
            <textField pattern="EEEEE dd MMMMM yyyy">
                <reportElement x="1" y="4" width="211" height="13" uuid="68ea646b-0cef-4427-86b7-32f0f5bd47f8"/>
                <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="5" splitType="Stretch"/>
    </summary>
</jasperReport>


尝试将
详细信息
带中元素的
位置类型
更改为
绝对
。@Viki888在位置类型I中没有“绝对”选项,只有浮动、相对于顶部固定和相对于底部固定,没有解决我的问题。尝试将
详细信息
波段中的元素的
位置类型
更改为
绝对
。@Viki888在位置类型中我没有“绝对”选项,只有浮动、相对于顶部固定和相对于底部固定,没有解决我的问题。