How to prevent joining values in Row Group (column) of Crosstab?
<p>Is there a way to unmerge cells with the same value in crosstab?</p>

<p>The problem is that same valued cells are getting merged. </p>

<p>I want the value to be repeated and have cell borders. For example, in a row group, if i have 2 columns, col1 with values 'abc' and col2 with values 1,2,3 and if there are 3 rows, the col1 is one big cell with 'abc' printed only once. </p>

<p>This is what I don't want and instead want it to be printed 3 times.</p>

<p>This is presentation I required:</p>

<p><a href="https://i.stack.imgur.com/M2cF4.png" rel="nofollow"><img src="https://i.stack.imgur.com/M2cF4.png" alt="enter image description here"></a></p>

<p>Currently I have:</p>

<p><a href="https://i.stack.imgur.com/By4Re.png" rel="nofollow"><img src="https://i.stack.imgur.com/By4Re.png" alt="enter image description here"></a></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4_1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a53b72b8-0dda-468b-bffd-3e28d792a2d6"&gt;
    &lt;style name="Crosstab_CH" mode="Opaque" backcolor="#F0F8FF"&gt;
        &lt;box&gt;
            &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
        &lt;/box&gt;
    &lt;/style&gt;
    &lt;style name="Crosstab_CG" mode="Opaque" backcolor="#BFE1FF"&gt;
        &lt;box&gt;
            &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
        &lt;/box&gt;
    &lt;/style&gt;
    &lt;style name="Crosstab_CT" mode="Opaque" backcolor="#005FB3"&gt;
        &lt;box&gt;
            &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
        &lt;/box&gt;
    &lt;/style&gt;
    &lt;style name="Crosstab_CD" mode="Opaque" backcolor="#FFFFFF"&gt;
        &lt;box&gt;
            &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
            &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
        &lt;/box&gt;
    &lt;/style&gt;
    &lt;queryString&gt;
        &lt;![CDATA[select * from test]]&gt;
    &lt;/queryString&gt;
    &lt;field name="col1" class="java.lang.String"/&gt;
    &lt;field name="col2" class="java.lang.Integer"/&gt;
    &lt;field name="col3" class="java.lang.String"/&gt;
    &lt;field name="col4" class="java.lang.Integer"/&gt;
    &lt;field name="col5" class="java.lang.Integer"/&gt;
    &lt;summary&gt;
        &lt;band height="214" splitType="Stretch"&gt;
            &lt;crosstab&gt;
                &lt;reportElement x="0" y="0" width="555" height="214" uuid="a8663f8c-217c-4ef3-ab2c-a11120aea80e"/&gt;
                &lt;rowGroup name="col11" width="60"&gt;
                    &lt;bucket class="java.lang.String"&gt;
                        &lt;bucketExpression&gt;&lt;![CDATA[$F{col1}]]&gt;&lt;/bucketExpression&gt;
                    &lt;/bucket&gt;
                    &lt;crosstabRowHeader&gt;
                        &lt;cellContents mode="Opaque" style="Crosstab_CH"&gt;
                            &lt;textField&gt;
                                &lt;reportElement x="0" y="0" width="60" height="20" uuid="6e0cb2ba-ea94-4b5e-a774-3092f6b0bd06"/&gt;
                                &lt;textFieldExpression&gt;&lt;![CDATA[$V{col11}]]&gt;&lt;/textFieldExpression&gt;
                            &lt;/textField&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabRowHeader&gt;
                    &lt;crosstabTotalRowHeader&gt;
                        &lt;cellContents&gt;
                            &lt;staticText&gt;
                                &lt;reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="4787314d-3cb1-4f29-99d4-1443453e5d1b"/&gt;
                                &lt;text&gt;&lt;![CDATA[Total col11]]&gt;&lt;/text&gt;
                            &lt;/staticText&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabTotalRowHeader&gt;
                &lt;/rowGroup&gt;
                &lt;rowGroup name="col21" width="60"&gt;
                    &lt;bucket class="java.lang.Integer"&gt;
                        &lt;bucketExpression&gt;&lt;![CDATA[$F{col2}]]&gt;&lt;/bucketExpression&gt;
                    &lt;/bucket&gt;
                    &lt;crosstabRowHeader&gt;
                        &lt;cellContents mode="Opaque" style="Crosstab_CH"&gt;
                            &lt;textField&gt;
                                &lt;reportElement x="0" y="0" width="60" height="20" uuid="bf3d5e77-12a9-44cc-94d1-3f2a317f32d1"/&gt;
                                &lt;textFieldExpression&gt;&lt;![CDATA[$V{col21}]]&gt;&lt;/textFieldExpression&gt;
                            &lt;/textField&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabRowHeader&gt;
                    &lt;crosstabTotalRowHeader&gt;
                        &lt;cellContents&gt;
                            &lt;staticText&gt;
                                &lt;reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="c21bf242-edbb-4533-9d7d-7120282703a5"/&gt;
                                &lt;text&gt;&lt;![CDATA[Total col21]]&gt;&lt;/text&gt;
                            &lt;/staticText&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabTotalRowHeader&gt;
                &lt;/rowGroup&gt;
                &lt;columnGroup name="col31" height="20"&gt;
                    &lt;bucket class="java.lang.String"&gt;
                        &lt;bucketExpression&gt;&lt;![CDATA[$F{col3}]]&gt;&lt;/bucketExpression&gt;
                    &lt;/bucket&gt;
                    &lt;crosstabColumnHeader&gt;
                        &lt;cellContents mode="Opaque" style="Crosstab_CH"&gt;
                            &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                            &lt;textField&gt;
                                &lt;reportElement x="0" y="0" width="120" height="20" uuid="320dded3-882b-4e8d-a821-ce94996a72d2"&gt;
                                    &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                                &lt;/reportElement&gt;
                                &lt;textFieldExpression&gt;&lt;![CDATA[$V{col31}]]&gt;&lt;/textFieldExpression&gt;
                            &lt;/textField&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabColumnHeader&gt;
                    &lt;crosstabTotalColumnHeader&gt;
                        &lt;cellContents&gt;
                            &lt;staticText&gt;
                                &lt;reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="e78a53ad-4437-41d1-8cea-ab1a2fdf09d3"/&gt;
                                &lt;text&gt;&lt;![CDATA[Total col31]]&gt;&lt;/text&gt;
                            &lt;/staticText&gt;
                        &lt;/cellContents&gt;
                    &lt;/crosstabTotalColumnHeader&gt;
                &lt;/columnGroup&gt;
                &lt;measure name="col4_MEASURE1" class="java.lang.Integer" calculation="Count"&gt;
                    &lt;measureExpression&gt;&lt;![CDATA[$F{col4}]]&gt;&lt;/measureExpression&gt;
                &lt;/measure&gt;
                &lt;measure name="col5_MEASURE1" class="java.lang.Integer" calculation="Count"&gt;
                    &lt;measureExpression&gt;&lt;![CDATA[$F{col5}]]&gt;&lt;/measureExpression&gt;
                &lt;/measure&gt;
                &lt;crosstabCell width="120" height="20"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CD"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="20" uuid="ddc2801e-7492-4848-b7f7-422d7267cadb"/&gt;
                            &lt;box&gt;
                                &lt;topPen lineWidth="0.5"/&gt;
                                &lt;leftPen lineWidth="0.5"/&gt;
                                &lt;bottomPen lineWidth="0.5"/&gt;
                                &lt;rightPen lineWidth="0.5"/&gt;
                            &lt;/box&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="60" y="0" width="60" height="20" uuid="38136ac4-94aa-46ef-91ca-b32ac1d19aba"&gt;
                                &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
                            &lt;/reportElement&gt;
                            &lt;box&gt;
                                &lt;topPen lineWidth="0.5"/&gt;
                                &lt;leftPen lineWidth="0.5"/&gt;
                                &lt;bottomPen lineWidth="0.5"/&gt;
                                &lt;rightPen lineWidth="0.5"/&gt;
                            &lt;/box&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
                &lt;crosstabCell width="60" height="20" columnTotalGroup="col31"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CT"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="0b620468-123a-434e-8a87-be8125b86470"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="d3c3da1b-7c66-48e5-8328-9c775e036229"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
                &lt;crosstabCell width="60" height="20" rowTotalGroup="col11"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CT"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="08db97ef-0f91-4301-a552-2eec171c2b91"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="2fa36822-c633-4954-b6ad-bb2633dd827b"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
                &lt;crosstabCell width="60" height="20" rowTotalGroup="col11" columnTotalGroup="col31"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CT"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="a1545b3f-ac13-4e97-8720-3b526af18207"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="02c1d1d7-8b20-461e-8bd9-b2e4ceff02ed"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
                &lt;crosstabCell width="60" height="20" rowTotalGroup="col21"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CG"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="10" uuid="94b61c57-3b18-4134-a48f-36394cf8ac28"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="10" width="60" height="10" uuid="b8b84ab6-a800-427e-8738-40dc17f8b7ae"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
                &lt;crosstabCell width="60" height="20" rowTotalGroup="col21" columnTotalGroup="col31"&gt;
                    &lt;cellContents mode="Opaque" style="Crosstab_CT"&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="e34172fb-29af-43aa-af6b-50bb63949236"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col4_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                        &lt;textField&gt;
                            &lt;reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="232ba479-f365-4fb8-8402-4a9d50f79c6c"/&gt;
                            &lt;textFieldExpression&gt;&lt;![CDATA[$V{col5_MEASURE1}]]&gt;&lt;/textFieldExpression&gt;
                        &lt;/textField&gt;
                    &lt;/cellContents&gt;
                &lt;/crosstabCell&gt;
            &lt;/crosstab&gt;
        &lt;/band&gt;
    &lt;/summary&gt;
&lt;/jasperReport&gt;
</code></pre>