Jasper reports 如何防止JasperReports文本字段中重复数据
我正在使用JasperReports,文本字段数据有问题,请继续下一页。Jasper reports 如何防止JasperReports文本字段中重复数据,jasper-reports,Jasper Reports,我正在使用JasperReports,文本字段数据有问题,请继续下一页。 我在详细信息栏中有3个文本字段。 Band splitType=“拉伸”。 每个文本字段都有边框和ISPRINTWHENDEAILLOVERFLOWS参数集“true”。 当文本字段中的数据不适合页面时,它将继续下一页。所以我需要打印同一波段的其他文本文件(因为我需要打印每个文本字段的边框) 但isPrintWhenDetailOverflows=“true”也会导致第二页其他文本字段中的数据重复,尽管它们的内容适合第一页
我在详细信息栏中有3个文本字段。
Band splitType=“拉伸”。
每个文本字段都有边框和ISPRINTWHENDEAILLOVERFLOWS参数集“true”。
当文本字段中的数据不适合页面时,它将继续下一页。所以我需要打印同一波段的其他文本文件(因为我需要打印每个文本字段的边框)
但isPrintWhenDetailOverflows=“true”也会导致第二页其他文本字段中的数据重复,尽管它们的内容适合第一页 说明:
jasper报告文档中说:
isPrintWhenDetailOverflows()
If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page.
因此我认为这可能是一个问题。删除当尾流溢出=“true”
时isprint。这两件事是stretchWithOverflow=“true”
和stretchType=“RelativeTotallesObject”
在这种情况下对我有效。因此您的文本字段将类似于:
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="cell" stretchType="RelativeToTallestObject" x="266" y="0" width="266" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="9" isBold="false" pdfEncoding="Cp1251" isPdfEmbedded="true"/>
<paragraph leftIndent="2"/>
</textElement>
<textFieldExpression><![CDATA[$F{structure}]]></textFieldExpression>
</textField>
是否为textField
设置了isStretchWithOverflow=“true”
?在textField
中reportElement
的stretchType
属性的值是多少?请提供文本字段的jrxml代码。stretchType=”RelativeTotalListObject“无拉伸类型=“RelativeToBandHeight“不要解决我在图中看到的问题,textfield1
和textfield3
内容在第二页没有重复。这不是你想要的吗?关于边框,它将仅封闭文本,因为textField已超出其预定义高度。我认为对于textfield1
和textfield3