碧玉报告空白乐队仍然占据空间 [英] Jasper report blank bands still takes up space
问题描述
我的问题是,即使该行是空白的,它仍然占据了条带高度的空间,因此在下一条条带之前存在比通常更大的间隙.
My problem is that even though the line is blank it still takes up the space of the height of the band and thus there is a larger gap than usual before the next band.
我的碧玉文件中的乐队看起来像这样:
The band in my jasper file looks like this:
<band height="30" splitType="Stretch">
<staticText>
<reportElement uuid="274e9a4d-939e-46f6-8508-52ebc9051180" x="0" y="10" width="515" height="20" isRemoveLineWhenBlank="true" forecolor="#111B3F">
<printWhenExpression><![CDATA[$F{projects_count} != "0"]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="Arial Black" size="14" pdfFontName="jasper/fonts/ARIBLK.TTF"/>
</textElement>
<text><![CDATA[Project experience]]></text>
</staticText>
</band>
这里有文字staticText,仅在<![CDATA [$ F {projects_count}!="0"]]>
时显示.这行得通.在reportElement上,我还设置了 isRemoveLineWhenBlank ="true"
Here I have text staticText that should only display when <![CDATA[$F{projects_count} != "0"]]>
. This works. On the reportElement I also set isRemoveLineWhenBlank="true"
由于高度设置为30,因此它仍然占用报告中的空间,而且我似乎无法弄清楚如何不仅不显示文本,而且在不满足某些条件的情况下以某种方式删除条带
Since the height is set to 30 it still takes up space in my report and I can't seem to figure out how to not only not display the text but also remove the band in a way if it does not meet some condition.
推荐答案
Hendri-我是否了解您已在乐队内的文本字段上设置了打印时"表达式?而是为整个详细信息区域设置打印时"表达式.
Hendri -- am I understanding that you have set the Print When expression on the text field within the band? Set the Print When expression for the whole detail band instead.
<band height="30">
<printWhenExpression><![CDATA[$F{projects_count} != "0"]]></printWhenExpression>
<textField> {... etc}
这篇关于碧玉报告空白乐队仍然占据空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!