即使应用了“空白时删除线”,框架仍在占用空间

时间:2019-11-11 06:31:19

标签: jasper-reports

我在框架内使用框架。仅当条件满足时才显示内部框架。框架内也有某些字段。 我面临的问题是,即使条件为false并且未显示整个框架,它仍显示空白。

我已经将“空白时删除行”设置为true,但是仍然存在空白。

<band height="201">
    <printWhenExpression><![CDATA[$F{Name}!=null]]></printWhenExpression>
    <frame>
        <reportElement positionType="Float" x="1" y="1" width="573"
            height="200" isRemoveLineWhenBlank="true" />
        <frame>
            <reportElement positionType="Float" x="67" y="0" width="506"
                height="199" isRemoveLineWhenBlank="true" />
            <box>
                <leftPen lineWidth="1.0" />
            </box>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" x="7" y="2" width="474"
                    height="17" isRemoveLineWhenBlank="true" />
                <textElement>
                    <font fontName="Arial" size="12" isBold="true" />
                </textElement>
                <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression>
            </textField>
            <frame>
                <reportElement positionType="Float" x="0" y="20"
                    width="506" height="151" isRemoveLineWhenBlank="true">
                    <printWhenExpression><![CDATA[$F{RemarkDisplay}.equalsIgnoreCase("FALSE")]]></printWhenExpression>
                </reportElement>
                <box>
                    <leftPen lineWidth="1.0" />
                </box>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" x="7" y="0"
                        width="38" height="14" isRemoveLineWhenBlank="true" forecolor="#615B5B">
                    </reportElement>
                    <textElement verticalAlignment="Bottom">
                        <font fontName="Arial" size="11" isBold="true" />
                    </textElement>
                    <textFieldExpression><![CDATA[$R{l_Phone}+":"]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" x="36" y="106"
                        width="457" height="14" isRemoveLineWhenBlank="true" forecolor="#666666" />
                    <textElement textAlignment="Left" verticalAlignment="Bottom">
                        <font fontName="Arial" size="11" isPdfEmbedded="true" />
                        <paragraph lineSpacing="Single" />
                    </textElement>
                    <textFieldExpression><![CDATA[$F{Rate}!=null?$F{Rate}:" "]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" mode="Transparent"
                        x="7" y="106" width="28" height="14" isRemoveLineWhenBlank="true"
                        forecolor="#615B5B" />
                    <textElement textAlignment="Left" verticalAlignment="Bottom">
                        <font fontName="Arial" size="11" isBold="true" isPdfEmbedded="true" />
                        <paragraph lineSpacing="Single" />
                    </textElement>
                    <textFieldExpression><![CDATA[$R{l_Rate}+":"]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" x="7" y="121"
                        width="102" height="14" isRemoveLineWhenBlank="true" forecolor="#615B5B" />
                    <textElement textAlignment="Left" verticalAlignment="Bottom">
                        <font fontName="Arial" size="11" isBold="true" isPdfEmbedded="true" />
                        <paragraph lineSpacing="Single" />
                    </textElement>
                    <textFieldExpression><![CDATA[$R{l_ReferenceNumber}+":"]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" x="7" y="137"
                        width="38" height="14" isRemoveLineWhenBlank="true" forecolor="#615B5B" />
                    <textElement verticalAlignment="Bottom">
                        <font fontName="Arial" size="11" isBold="true" />
                    </textElement>
                    <textFieldExpression><![CDATA[$R{l_Status}+":"]]></textFieldExpression>
                </textField>
            </frame>
        </frame>
        <textField>
            <reportElement positionType="Float" x="17" y="2" width="50"
                height="14" forecolor="#615B5B">
            </reportElement>
            <textElement>
                <font fontName="Arial" size="11" isBold="true" />
            </textElement>
            <textFieldExpression><![CDATA[$F{Date}]]></textFieldExpression>
        </textField>
    </frame>
</band>

使用以下条件的第三帧:$ F {RemarkDisplay} .equalsIgnoreCase(“ FALSE”)在我的情况下不正确,它也不是在移动整个帧字段,而是显示空白,

对我要去哪里有帮助吗?

0 个答案:

没有答案