我在JasperReports报告中有一个静态文本列表,显示在另一个下方
A
B
C
D
E
我需要元素折叠以防其中一些未打印。(这些静态文本是标签,使用 print when 表达式对应的值为 null 时不会打印)
示例:如果 B 为空,则输出应如下所示......在 B 所在的位置没有任何空格。(C、D、E 应该向上浮动)
A
C
D
E
我无法使用诸如Remove Line When Blank、Position Type as Float等属性使其工作。静态文本为Null 时没有属性Blank ,就像文本字段一样。这个东西适用于文本字段。
我想出的示例代码。如果这个案例有什么问题,请告诉我:
<detail>
<band height="170" splitType="Stretch">
<staticText>
<reportElement uuid="df801bc0-7c70-42c3-bc34-a8d735a96388" positionType="Float" x="88" y="15" width="100" height="20" isRemoveLineWhenBlank="true"/>
<textElement/>
<text><![CDATA[A]]></text>
</staticText>
<staticText>
<reportElement uuid="bdeb24d3-74b9-4b93-a2ad-451732e500b5" positionType="Float" x="88" y="35" width="100" height="20" isRemoveLineWhenBlank="true"/>
<textElement/>
<text><![CDATA[B]]></text>
</staticText>
<staticText>
<reportElement uuid="e68dc5fd-ed4f-46e0-aa5d-be1edc652aa3" positionType="Float" x="88" y="55" width="100" height="20" isRemoveLineWhenBlank="true"/>
<textElement/>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement uuid="0b7481b2-33cd-4573-84b2-4a6738ca0ee3" positionType="Float" x="88" y="75" width="100" height="20" isRemoveLineWhenBlank="true"/>
<textElement/>
<text><![CDATA[D]]></text>
</staticText>
<staticText>
<reportElement uuid="2b45cded-10f3-46b5-a87b-5c844e61b247" positionType="Float" x="88" y="95" width="100" height="20" isRemoveLineWhenBlank="true"/>
<textElement/>
<text><![CDATA[E]]></text>
</staticText>
</band>
</detail>
有没有人解决过这个问题?