I need ot merge cells with same value (rows merge) I have set isPrintRepeatedValues="false" at the reportElement but got following bug,
(common value of four cells is - "11")
All has been tested in JasperReports v 6.3 The question: how to merge rows properly (i.e. bertical alignment middel, no unwanted border line etc)? Thank you!
There is the report's frament:
<detail> <band height="16" splitType="Stretch"> <!-- <printWhenExpression><![CDATA[$F{index} != null]]></printWhenExpression>--> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="0" y="0" width="40" height="16" isPrintWhenDetailOverflows="true" uuid="1a4235b0-feb5-4e33-b498-d0af214748d4" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" markup="styled" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{index}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="40" y="0" width="170" height="16" isPrintWhenDetailOverflows="true" uuid="91174c8d-d234-4292-acf3-655008ec352f" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{nss_mark}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="210" y="0" width="90" height="16" isPrintWhenDetailOverflows="true" uuid="4cd16947-d3b8-4d4d-8622-bd31a4537ed4" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{doc_effective_date}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="300" y="0" width="120" height="16" isPrintWhenDetailOverflows="true" uuid="4cd16947-d3b8-4d4d-8622-bd31a4537ed4" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{npa_point}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" > <reportElement style="bordered" x="420" y="0" width="220" height="16" isPrintWhenDetailOverflows="true" isPrintRepeatedValues="false" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{contains_in_npa_links}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="640" y="0" width="80" height="16" isPrintWhenDetailOverflows="true" uuid="4cd16947-d3b8-4d4d-8622-bd31a4537ed4" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{included_in_evedeces_base_of_technical_regulations}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="bordered" x="720" y="0" width="80" height="16" isPrintWhenDetailOverflows="true" uuid="4cd16947-d3b8-4d4d-8622-bd31a4537ed4" stretchType="RelativeToBandHeight"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <textFieldExpression><![CDATA[$F{status}]]></textFieldExpression> </textField> </band>
1 Answer:
Posted on July 8, 2020 at 7:09am
Hi,
It works correctly and this is not what you need. The answer to your question is by the next link:
https://community.jaspersoft.com/wiki/how-merge-table-rows-repeated-values
Удачи