Jump to content
We've recently updated our Privacy Statement, available here ×

JasperReports 6.3 how to merge cells properly?


Recommended Posts

I need ot merge cells with same value (rows merge) I have set isPrintRepeatedValues="false" at the reportElement but got following bug,

jasper.jpg

(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>[/code]
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...