首页 文章

报告's text field' s“使用溢出拉伸”选项在PDF导出中添加空行

提问于
浏览
-1

我已将“Stretch With Overflow”选项设置为True到某些文本字段,当jasper查看器中的数据流正常工作时,文本在2行但在PDF文档中第二行为空:它只是添加一个空行 .

PDF Document

Jasper Viewer

实例xml代码:

<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="165" y="0" width="35" height="10" isRemoveLineWhenBlank="true" uuid="a5d7ff35-a2dc-480e-80a7-9246d8618b27"/>
    <textElement textAlignment="Left">
        <font fontName="Futura Std Light" size="7"/>
        <paragraph lineSpacing="Single"/>
    </textElement>
<textFieldExpression><![CDATA[$F{montant} == null && $F{numeroAppelant} != null ? $F{numeroAppele}.toString():
                        $F{duree} != null ? $F{duree}.toString() :
                        $F{volumeKo} != null ? null : $F{montant}.toString()]]>
</textFieldExpression>

2 回答

  • 1

    我找到了解决方案,我只是将行间距属性设置为1.5!

  • 0

    我发现当我更改字体时,它会正常工作 . 使用溢出选项拉伸时,另一个报表上的相同字体可以正常工作的问题 .

相关问题