Jasper Report: appear extra empty column in the end of table column [closed] - jasper-reports

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am using jaspersoft studio 5.6.0. I created a table in summary band to display data from database. it generate extra empty column in the end of table. can anybody help me on this problem?
result in word:
jrxml

As #Fabio Fantoni said in the comments, you need to make sure that your table width and column width match up.
Your tables widths do not match up with the width of the columns inside them (some by just a single pixel), this is probably causing the issue.
Here are the correct widths, but you should check them and adjust if needed:
First Table: width = 428 px
Second Table: width = 475 px
Third Table: width = 474 px
These changes can be made in JasperSoft Studio without the need of direct editing of the source.
Example
The following is the jrxml for your summary band with the adjusted table widths to match the width of the columns inside the table. Any adjustment to the column sizes will required you to change the widths of the tables.
<summary>
<band height="343">
<staticText>
<reportElement positionType="Float" x="39" y="1" width="241" height="20" uuid="7ba83b4b-6038-4657-ae77-a50396d66cea"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[A. Posisi TKA Baru yang disetujui :]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" x="39" y="83" width="58" height="20" isPrintWhenDetailOverflows="true" uuid="e6d5218f-5d8d-4521-bad1-0697e09cfa3d"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[B. Daftar ]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" x="39" y="160" width="58" height="20" isPrintWhenDetailOverflows="true" uuid="f797ef70-f498-40e0-9f35-181c0bf16933"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[C. Daftar]]></text>
</staticText>
<componentElement>
<reportElement key="table 17" style="table 17" positionType="Float" x="39" y="21" width="428" height="57" isPrintWhenDetailOverflows="true" uuid="6fb859a1-5044-47bd-9249-63fa455470aa">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" whenNoDataType="AllSectionsNoDetail">
<datasetRun subDataset="Table Dataset 1" uuid="84090836-d798-43a0-93bc-3cde0db803f2">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$P{DS1}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
<jr:column width="28" uuid="3363640b-30fb-4c36-b1f6-bc0a53cda03d">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="28" height="30" uuid="bd296baa-e9fe-43de-900e-7c71cd341787"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[No.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="28" height="20" isPrintWhenDetailOverflows="true" uuid="128b482b-45e2-4f5c-aeaf-87807921e469"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="136" uuid="20b03b70-6219-4d3b-8261-90b28ca98420">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="136" height="30" uuid="4981f674-08fc-473e-8c5b-fef5b708f14d"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Posisi TKA]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="136" height="20" isPrintWhenDetailOverflows="true" uuid="7e868880-19a9-4d1d-be80-b75f7b508427"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{posisiTka}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="67" uuid="0bd520ee-899a-4a09-a728-40b7e0ded152">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="67" height="30" uuid="5db7fe89-668a-47f1-a74d-89845dc000c9"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Dept.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="67" height="20" isPrintWhenDetailOverflows="true" uuid="44c8d21d-f8d0-4728-8270-0655cf9c02bf"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{departemen}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="88" uuid="41258d68-dd01-4e48-b59e-cdf94f31bd4a">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="88" height="30" uuid="b5d619ef-d7df-4ce1-9684-ac667f2123e7"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Periode Penggunaan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="88" height="20" isPrintWhenDetailOverflows="true" uuid="6ace5c77-cebd-480c-994d-31c593dfe1c9"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{periode}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="109" uuid="0923900a-06e1-46b5-9b06-d7cbd97cea32">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="109" height="30" uuid="7dda780f-29a0-44be-a5bf-de7c059c8b1e"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Keterangan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="109" height="20" isPrintWhenDetailOverflows="true" uuid="683f9507-e3dd-4afe-88bf-29df3296186b"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{keterangan}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<componentElement>
<reportElement key="table 17" style="table 17" positionType="Float" x="39" y="103" width="475" height="52" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="5b51d0bf-d1e9-4745-8ade-b69474871a79">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" whenNoDataType="AllSectionsNoDetail">
<datasetRun subDataset="Table Dataset 1" uuid="1c0dad36-2ce8-481d-aa16-738c65ddbcbe">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$P{DS2}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
<jr:column width="28" uuid="3dd2aa48-6001-475e-8084-b71fe13e63ef">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="28" height="30" uuid="cc51c75b-a38f-4142-996b-ccb0e33503d6"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[No.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="28" height="20" uuid="46b22f66-15b3-4819-a353-bb147e83f7af"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="136" uuid="a5200240-1b8e-48ff-a898-60de9a6d8956">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="136" height="30" uuid="f6e47ed7-3098-4c7f-a773-02b48b0c66d3"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Posisi TKA]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="136" height="20" isPrintWhenDetailOverflows="true" uuid="64e41021-7e4d-4c7e-80e4-5ba3c2f7073c"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{posisiTka}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="67" uuid="2f7ca895-6e44-4f8d-8b74-01e074514361">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="67" height="30" uuid="60a909a9-e015-4bb5-8ecc-8e6b85b27570"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Dept.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="67" height="20" isPrintWhenDetailOverflows="true" uuid="dc8674f0-f94e-43b7-9d41-2fdde8873095"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{departemen}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="88" uuid="eb28444a-0f7a-4d0d-ae62-c3189cc73503">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="88" height="30" uuid="5cbf811c-eef7-49d0-8137-013b3b5e1a72"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Periode Penggunaan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="88" height="20" isPrintWhenDetailOverflows="true" uuid="db724659-5863-428a-ab7f-4dae8bd04d42"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{periode}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="157" uuid="ac699b7b-c128-4a90-bd72-caddb826c491">
<jr:columnHeader style="table 17_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="157" height="30" uuid="a0debb58-3628-4861-bf81-019f4dd7f638"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Keterangan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 17_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="157" height="20" isPrintWhenDetailOverflows="true" uuid="8b2d4d5a-80a1-4701-bfd5-519fd1c5f733"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{keterangan}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<componentElement>
<reportElement key="table 18" style="table 18" positionType="Float" x="39" y="181" width="474" height="70" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="0f49d051-fe9a-45ee-a5ab-d570a0b3b2e5">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" whenNoDataType="AllSectionsNoDetail">
<datasetRun subDataset="Table Dataset 1" uuid="28d7100b-eb32-4d34-9222-0141bf26b9f3">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$P{DS3}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
<jr:column width="32" uuid="0ab7278c-e13d-4233-9e82-350e39d1d96a">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="32" height="30" uuid="a41722a3-74fd-4e9d-ba1c-70e54eb0576d"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[No.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="32" height="20" uuid="e91dfa23-53ba-4252-a23a-c03b72927b76"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="707eacdf-9a63-4142-bd34-6a325b7a9492">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="b8eaaa00-e9e6-47e3-a727-6273ed3e572f"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Nama Posisi Sebelumnya]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="90" height="20" isPrintWhenDetailOverflows="true" uuid="996833d4-3fe3-4194-acef-6f8586b758ab"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{posisiSebelumnya}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="107" uuid="dca6e995-3c22-4996-99dd-874fdfab4890">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="107" height="30" uuid="90a99334-9730-4a70-957e-45ae46cf264e"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Perubahan Nama Posisi yang Disetujui]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="107" height="20" isPrintWhenDetailOverflows="true" uuid="ecf7a33f-3b75-4da9-9636-809887e4bfe3"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{posisiTka}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="64" uuid="4cc762f7-ec87-4fc2-b253-ac3035baed61">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="64" height="30" uuid="425a68df-2c74-4e22-8460-2e34707da3c5"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Dept.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="64" height="20" isPrintWhenDetailOverflows="true" uuid="386e3887-8962-4273-9d43-4843e9c87c03"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{departemen}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="448fb74b-aeff-4e4f-b92c-47718869e67f">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="8e8f5ec8-f2d2-4482-aad1-92a69e062f1f"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Periode Penggunaan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="90" height="20" isPrintWhenDetailOverflows="true" uuid="c0739140-feae-4f5e-bc92-5301f819d207"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{periode}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="91" uuid="d574582b-535a-47c6-a2d6-73eab6970a84">
<jr:columnHeader style="table 18_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="91" height="30" uuid="88f0969f-f791-40fd-88f4-5db2df6d2403"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Keterangan]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 18_TD" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="91" height="20" isPrintWhenDetailOverflows="true" uuid="7cd271d1-0b72-41a8-8521-4b2b533924ff"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{keterangan}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" x="100" y="160" width="455" height="20" isPrintWhenDetailOverflows="true" uuid="faf5ca75-b403-4120-bba0-d463876a7ce5"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{terbilangTable3}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="99" y="83" width="456" height="20" isPrintWhenDetailOverflows="true" uuid="64e2c935-dbf3-4d4f-a8c9-7d7b264c3c1c"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{terbilangTable2}]]></textFieldExpression>
</textField>
</band>
</summary>

Related

Jasper report table can't fit on the current page

I have a Jasper report that is iterating over a list of data returned by a query and displaying the data in tabular format. Depending on the number of table rows the contents of the table might be split across two pages.
Is there a way to prevent this data splitting and cause the entire table to appear on the next page if it doesn't all fit on the current page?
The detail band of my report is as follows:
<detail>
<band height="100" splitType="Prevent">
<componentElement>
<reportElement x="0" y="0" width="800" height="20" isPrintWhenDetailOverflows="true" uuid="3e389075-14ca-4f57-9d02-175fbc34a639"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="output" uuid="acf7113d-1f5a-4acc-ad2c-70efb491bb4f">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{output})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="60" width="800">
<textField>
<reportElement isPrintRepeatedValues="false" x="0" y="20" width="555" height="20" uuid="156e4ef8-b8d9-4dc4-8a50-4f27e0f36a83"/>
<textFieldExpression><![CDATA[$F{reference}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="0" y="40" width="200" height="20" uuid="3e389075-14ca-4f57-9d02-175fbc34a639"/>
<jr:list printOrder="Vertical">
<datasetRun subDataset="unitDetails" uuid="acf7113d-1f5a-4acc-ad2c-70efb491bb4f">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{units})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="40" width="800">
<textField>
<reportElement x="0" y="0" width="100" height="20" uuid="ead7d8ba-12e2-4a0e-af92-66a50b34148f"/>
<textFieldExpression><![CDATA[$F{businessUnit}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="0" y="20" width="800" height="20" uuid="85e29233-08b3-4717-b260-82c9e4a003c5"/>
<jr:table>
<datasetRun subDataset="codeDetails" uuid="1f5dfa57-f961-4574-b663-8637b2aa6f6e">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{codes})]]></dataSourceExpression>
</datasetRun>
<jr:column width="100" uuid="f832562c-1459-44a4-89df-fe5feadfe7ee">
<jr:detailCell height="20">
<textField>
<reportElement x="0" y="0" width="100" height="20" uuid="e2ce6b92-bf8a-45f8-936a-af99b2ced4e7"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{code}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="150" uuid="b8c51d7d-f4d2-47c9-90a8-2449dff2a9f9">
<jr:columnHeader height="20">
<staticText>
<reportElement x="0" y="0" width="150" height="20" uuid="2fc57842-d68d-4398-a0df-4eddd74316fd"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Total]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20">
<textField>
<reportElement x="0" y="0" width="150" height="20" uuid="b2953321-ce5d-4e5f-94e3-8b48b49bbf90"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="150" uuid="f8e255a7-951d-43ad-962b-f4ee32efaa80">
<jr:columnHeader height="20">
<staticText>
<reportElement x="0" y="0" width="150" height="20" uuid="69deede1-0fbc-4fd0-b430-4f0f3cacdc4f"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Approved]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20">
<textField>
<reportElement x="0" y="0" width="150" height="20" uuid="200263e0-f9fb-4626-8cee-3eb838d51add"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{approved}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="150" uuid="b4d8feb1-4134-4302-bad1-902685238d3e">
<jr:columnHeader height="20">
<staticText>
<reportElement x="0" y="0" width="150" height="20" uuid="096581a7-beec-43bc-a17e-ce96c4384838"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Rejected]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20">
<textField>
<reportElement x="0" y="0" width="150" height="20" uuid="3c5d019f-c4af-479b-b180-d52a6606d4e0"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{rejected}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
The report output looks like the following where the bottom of the page has the table headings but not the contents because the contents don't fit.

Extra blank page after page with list

Here is my JRXML On the second page I created a table using the nested list. In Preview in Jaspersoft Studio everything looks good, but after generating PDF on the page where my nested list is, an empty page is added. I have no idea how I can fix this problem.
I tried:
Remove Line When Blank - for lists and fields.
When No Data Type - all options tried and tested.
I have a problem with generating an additional blank page in PDF. Our company system does not support generating reports from subreports to multiple pages. As a workaround, a 43 page printout was created and each page is divided by "Page Break". This works well. My data source is an XML file.
I've tried to solve previously given here in similar problems but it doesn't help.
I don't want to generate this empty page.
Part of nested list code:
<componentElement>
<reportElement x="0" y="240" width="555" height="40" uuid="5a5114e6-f143-4e73-9a70-6aa3285b4d31">
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="OrderItems" uuid="a5783264-74e9-43b2-8312-84e805170f06">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/wstxns1:XML/wstxns1:p7_Object/wstxns1:productOrder/wstxns1:items")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="40" width="555">
<textField>
<reportElement style="Table_TD" x="0" y="0" width="185" height="20" uuid="9f67e274-92bc-4a21-8403-d60b4115c5c3">
</reportElement>
<textElement>
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{prospect/name}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Table_TD" x="185" y="0" width="185" height="20" uuid="262d8477-4cdc-47dc-b746-b38793e05757">
</reportElement>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[($F{totalReccuringChargeAmount}!=null)?(new BigDecimal($F{totalReccuringChargeAmount}).setScale(2, BigDecimal.ROUND_HALF_UP)).toString() + " " + $F{totalReccuringChargecurrency}:""]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Table_TD" x="370" y="0" width="185" height="20" uuid="a9aad9d3-9269-427e-b0e7-032f582c44e7">
</reportElement>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{commitmentPeriod[Level0]}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="0" y="20" width="555" height="20" isRemoveLineWhenBlank="true" uuid="96c06463-aaa8-4ee9-80be-0110bbc8258c">
</reportElement>
<jr:list printOrder="Vertical">
<datasetRun subDataset="OrderItems" uuid="100d9171-37f5-45fc-b7b8-affe80e508af">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("//wstxns1:items[wstxns1:itemId = '"+$F{itemId}+"']/wstxns1:configuration/wstxns1:prospect/wstxns1:children/wstxns1:items")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="20" width="555">
<textField>
<reportElement style="Table_TD" x="0" y="0" width="185" height="20" uuid="1e3d8870-3a1f-4cd2-923d-ac1547d5805f">
</reportElement>
<textElement>
<font fontName="SansSerif" size="9"/>
</textElement>
<textFieldExpression><![CDATA["--"+$F{prospect/name}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Table_TD" x="185" y="0" width="185" height="20" uuid="8dee85a5-406b-4a81-ab42-1d29ade1ceab">
</reportElement>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="9"/>
</textElement>
<textFieldExpression><![CDATA[($F{totalReccuringChargeAmount}!=null)?(new BigDecimal($F{totalReccuringChargeAmount}).setScale(2, BigDecimal.ROUND_HALF_UP)).toString() + " " + $F{totalReccuringChargecurrency}:""]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Table_TD" x="370" y="0" width="185" height="20" uuid="80044161-2cc9-461d-bb6b-4b7426d9479c">
</reportElement>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{commitmentPeriod[Level1]}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
<textField>
<reportElement style="Table_TH" positionType="Float" x="185" y="280" width="185" height="30" backcolor="#D9D9D9" uuid="9e550a00-d376-4f3d-859e-9f3ebd875b76">
</reportElement>
<box>
<pen lineWidth="0.5"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[($F{mainOrderTotalAmount}!=null)?(new BigDecimal($F{mainOrderTotalAmount}).setScale(2, BigDecimal.ROUND_HALF_UP)).toString()+" "+$F{mainOrderCurrency}:" "]]></textFieldExpression>
</textField>
<staticText>
<reportElement style="Table_TH" positionType="Float" x="0" y="280" width="185" height="30" backcolor="#D9D9D9" uuid="aa918c59-db11-49ad-8ab1-1e296b8e8b08">
</reportElement>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Total: ]]></text>
</staticText>
<staticText>
<reportElement style="Table_CH" x="0" y="210" width="185" height="30" backcolor="#D9D9D9" uuid="5e3cea42-8937-4876-9ef3-4fef54ae66db">
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Package name]]></text>
</staticText>
<staticText>
<reportElement style="Table_CH" x="185" y="210" width="185" height="30" backcolor="#D9D9D9" uuid="a76bf537-65a0-400f-a75a-b0f03bd88796">
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Monthly charge]]></text>
</staticText>
<staticText>
<reportElement style="Table_CH" x="370" y="210" width="185" height="30" backcolor="#D9D9D9" uuid="6893b476-bcc2-42ab-8078-364f13b6fcf6">
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Contract period]]></text>
</staticText>
<staticText>
<reportElement x="0" y="750" width="555" height="40" uuid="eb235aed-5c5e-4ef3-b9ab-f776e5307aa9">
</reportElement>
<textElement>
<font fontName="SansSerif" size="9"/>
</textElement>
<text><![CDATA[O749504]]></text>
</staticText>
</band>
Any ideas guys? Maybe you need more details?
Maybe this will help you:
Set the split Typ of the detail band to Stretch:
splitType="Stretch"
best wishes
We had a similar problem. If the a list was the last item in the page in same cases a blank page was added.
When we added the whole list to a new band the empty page disappeared.

Why does the detail-band grow on second page?

I'm defining a report for invoices, an invoice may have n items (rows) in the detail. I defined a dataset in order to display the items without the need of a subreport. Here my Detail-band:
<detail>
<band height="275" splitType="Stretch">
<rectangle>
<reportElement x="0" y="0" width="60" height="16" uuid="590f4cac-fba0-4e0b-aa74-db059a817946"/>
</rectangle>
<rectangle>
<reportElement x="60" y="0" width="140" height="16" uuid="1cc31301-e884-4648-952d-a68bcaa12b23"/>
</rectangle>
<rectangle>
<reportElement x="200" y="0" width="31" height="16" uuid="ac690ad3-a913-454f-80d0-574505609db1"/>
</rectangle>
<rectangle>
<reportElement x="231" y="0" width="100" height="16" uuid="6d623fd0-df6f-4ffd-b92b-8f18e0d2d5b2"/>
</rectangle>
<rectangle>
<reportElement x="331" y="0" width="37" height="16" uuid="afef801a-3280-4810-8d85-c1f591d2b75b"/>
</rectangle>
<staticText>
<reportElement x="3" y="2" width="44" height="11" uuid="f525bb2b-106a-44a3-9fb0-817f1eeb8260"/>
<textElement>
<font size="6"/>
</textElement>
<text><![CDATA[Artikel]]></text>
</staticText>
<staticText>
<reportElement x="63" y="2" width="126" height="11" uuid="0f97aa9e-cb83-4a95-92fc-fdc01e1506f1"/>
<textElement>
<font size="6"/>
</textElement>
<text><![CDATA[Beschreibung]]></text>
</staticText>
<staticText>
<reportElement x="207" y="2" width="22" height="11" uuid="6234d14c-abe2-482e-b6bb-f1c65dc19005"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[Menge]]></text>
</staticText>
<staticText>
<reportElement x="237" y="2" width="92" height="11" uuid="2bd9712e-b8be-4b90-823d-a530f6c7dcba"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[Einheitspreis]]></text>
</staticText>
<staticText>
<reportElement x="340" y="2" width="25" height="11" uuid="dbf02042-62f2-4b70-9b8b-fae588cb8055"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[Rabatt]]></text>
</staticText>
<rectangle>
<reportElement x="368" y="0" width="70" height="16" uuid="54f1f443-d742-4287-8ae6-d06b04682bf4"/>
</rectangle>
<rectangle>
<reportElement x="437" y="0" width="34" height="16" uuid="f23aa7d5-3eb9-478a-a799-a8acfe96d7af"/>
</rectangle>
<rectangle>
<reportElement x="471" y="0" width="84" height="16" uuid="7b4a3a55-b161-44c7-8512-33a127d68ba3"/>
</rectangle>
<staticText>
<reportElement x="381" y="2" width="54" height="11" uuid="e12d9869-3dcd-4b81-89f8-b3a3c6b2e28c"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[MwSt. Grundlage]]></text>
</staticText>
<staticText>
<reportElement x="441" y="2" width="28" height="11" uuid="fb7f8a0e-1632-454f-9742-5179831c8dc4"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[MwSt.]]></text>
</staticText>
<staticText>
<reportElement x="505" y="2" width="47" height="11" uuid="da9a079f-dc7e-4fef-9f31-eabd65340967"/>
<textElement textAlignment="Right">
<font size="6"/>
</textElement>
<text><![CDATA[MwSt. Betrag]]></text>
</staticText>
<rectangle>
<reportElement x="0" y="16" width="60" height="248" uuid="cd7f5e9a-aeae-425c-8783-22084707b432"/>
</rectangle>
<rectangle>
<reportElement x="60" y="16" width="140" height="248" uuid="01ee9155-aed8-4a55-8160-5f73ac6b1085"/>
</rectangle>
<rectangle>
<reportElement x="200" y="16" width="31" height="248" uuid="66698906-69ee-4fdc-8a04-ce14372bd065"/>
</rectangle>
<rectangle>
<reportElement x="231" y="16" width="100" height="248" uuid="0c260fbe-b300-4962-ad7b-ff7666fa2baa"/>
</rectangle>
<rectangle>
<reportElement x="331" y="16" width="37" height="248" uuid="1902828b-f84c-440c-8e3f-24cdffea33ec"/>
</rectangle>
<rectangle>
<reportElement x="368" y="16" width="69" height="248" uuid="880c1b82-4316-493a-b5b3-c4342bbb74c9"/>
</rectangle>
<rectangle>
<reportElement x="437" y="16" width="34" height="248" uuid="ee1c4e69-b69e-4cc8-9b83-24e9867012de"/>
</rectangle>
<rectangle>
<reportElement x="471" y="16" width="84" height="248" uuid="eade602d-0afa-4a6e-a3aa-5de350dc2ee5"/>
</rectangle>
<componentElement>
<reportElement x="0" y="16" width="555" height="17" uuid="be7e1e99-0990-4f3d-beaf-b304c08be036"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="items" uuid="ab906203-20bb-4347-806b-ef000f212bf9">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{righeDocumento})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="17" width="555">
<textField>
<reportElement x="3" y="2" width="56" height="14" uuid="448ef958-9459-4ab1-8896-f5b65dd7a552"/>
<textFieldExpression><![CDATA[$F{articolo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="63" y="2" width="136" height="14" uuid="24634427-d38f-4679-8996-a96d5051774b"/>
<textFieldExpression><![CDATA[$F{descrizione}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="236" y="2" width="92" height="14" uuid="20bda0b8-a3c0-47e7-bdff-555c481a894d"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[new DecimalFormat("0.00 €").format($F{prezzo})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="207" y="2" width="21" height="14" uuid="61766ba4-57d0-4509-ac41-ffd7bb4e12ef"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{quantita}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="338" y="2" width="27" height="14" uuid="535705c6-d0b6-401d-b767-efafb3ba42f7"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{sconto} == null ? "" : $F{sconto}+" %"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="439" y="2" width="28" height="14" uuid="0dc5fa14-efac-4c5b-898a-9a9152e588f7"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{aliquota}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="375" y="2" width="59" height="14" uuid="2772b49b-5355-463d-bebf-856537a416a3"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[new DecimalFormat("0.00 €").format($F{costo})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="482" y="2" width="70" height="14" uuid="0259a153-a0c2-4589-b296-fdca4ceeed2b"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[new DecimalFormat("0.00 €").format($F{iva})]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
The result is to see in the following pictures:
Example with many rows:
Example with two rows:
The problem is that when I have more rows it includes a second page (not shown here in my question) with header and footer, the detail is empty. The rest as we can see from the pics is OK.
Why? How do I fix it?
You have chosen a strange way to create this report, the normal way would be to make the detail band represent 1 article line in your invoice (hence detail band would have the height of 14)
Then if you need to draw lines to the bottom of the page you can always use the background band.
What is happening now?, probably the list overflows in your detail band that also have empty space under it, it can not create another one on same page and move the space to next page.
Solution Use the normal way of jasper report, datasource containing your lines, header in columnHeader band, fields in detail band (height 14) and your vertical lines in
the background band, also exports as to excel etc will be much cleaner.
If you like to keep your list, move all the rectangles to the
background band and reduce height of detail band to remaining
components (header + list height)

Crosstab table is not incrementing in jasper report

I have try to generated table from query using pivot. But when i tried to compile, the row is incremented but the colomn not increment. I have try to generated the query to pivot table in adf, and the colomn is generated. This is my code:
<band height="303">
<crosstab>
<reportElement x="1" y="0" width="499" height="200" uuid="77f9d29c-5ef4-4cd8-8b35-c18e7a70831d"/>
<rowGroup name="KOMPETENSI1" width="60">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{KOMPETENSI}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField>
<reportElement x="0" y="0" width="60" height="20" uuid="9cebd928-d666-4221-99bf-ef5a6d917ab1"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{KOMPETENSI1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="2975a46b-27d0-4e72-aec0-9e4116cee446"/>
<text><![CDATA[Total KOMPETENSI1]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="TAHUN1" height="20">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{TAHUN}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField>
<reportElement x="0" y="0" width="60" height="20" uuid="8f43f54c-6de3-407b-b36f-34d3b559cc02"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{TAHUN1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="6a20de24-7100-495f-9e85-c82d9924e69a"/>
<text><![CDATA[Total TAHUN1]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<columnGroup name="JOB1" height="20">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{JOB}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField>
<reportElement x="0" y="0" width="60" height="20" uuid="18d62d4b-e2e9-4ecf-b68a-f97f436d571d"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{JOB1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="68d57411-4634-4383-aaa6-a7f6f4fa8c8f"/>
<text><![CDATA[Total JOB1]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<columnGroup name="JENJAB1" height="20">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{JENJAB}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField>
<reportElement x="0" y="0" width="60" height="20" uuid="a46d026b-99c0-44c1-a7f0-b1b1deb8ea45"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{JENJAB1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="2b6f1d48-25aa-4345-9725-6065a99c72cc"/>
<text><![CDATA[Total JENJAB1]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="LEVEL_JOB_MEASURE1" class="java.lang.String">
<measureExpression><![CDATA[$F{LEVEL_JOB}]]></measureExpression>
</measure>
<measure name="LEVEL_KOMPETENSI_MEASURE1" class="java.lang.String">
<measureExpression><![CDATA[$F{LEVEL_KOMPETENSI}]]></measureExpression>
</measure>
<crosstabCell width="60" height="20">
<cellContents mode="Opaque" style="Crosstab 2_CD">
<textField>
<reportElement x="0" y="0" width="60" height="10" uuid="8d786258-a3ba-447e-b7a6-d515b3b83495"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" uuid="a052bd65-583b-4e65-ba9c-fb705fa8762e"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" columnTotalGroup="TAHUN1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="10f3a0a6-8da7-4eea-bd76-080ec3ac457d"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="ff6b097f-377b-450d-9f31-c2d615c689f0"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" columnTotalGroup="JOB1">
<cellContents mode="Opaque" style="Crosstab 2_CG">
<textField>
<reportElement x="0" y="0" width="60" height="10" uuid="d26f9674-e4c4-4ffb-8cc5-b4b83c2e5000"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" uuid="9cb43185-e1e8-42f9-8ba7-ec6b31a4f3f2"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" columnTotalGroup="JENJAB1">
<cellContents mode="Opaque" style="Crosstab 2_CG">
<textField>
<reportElement x="0" y="0" width="60" height="10" uuid="b40177ac-bbc2-416e-969c-8f21007ee4b6"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" uuid="814d6eff-61a6-430c-a2bf-fa2a92467496"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="KOMPETENSI1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="eedbded2-f179-4d9c-a38a-0e188854a3c4"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="2fd20c2a-8472-41d9-bef1-aa5ae54c1332"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="KOMPETENSI1" columnTotalGroup="TAHUN1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="524a4a98-6e1c-4d4b-974b-ce12dd00afd9"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="7b5692a4-9bc7-4499-9c52-c3cac33ff921"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="KOMPETENSI1" columnTotalGroup="JOB1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="40ad1b84-ff41-46e1-b7c2-85a347a72ae3"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="f2b21bb4-1125-4e3d-8476-dfbc846bd2f6"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="KOMPETENSI1" columnTotalGroup="JENJAB1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="10" forecolor="#FFFFFF" uuid="ab621e9e-d237-46db-96a2-2203c54ef55a"/>
<textFieldExpression><![CDATA[$V{LEVEL_JOB_MEASURE1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="10" width="60" height="10" forecolor="#FFFFFF" uuid="f806f467-6c8c-4dcb-a05c-f7f181b0b064"/>
<textFieldExpression><![CDATA[$V{LEVEL_KOMPETENSI_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
</band>
This is my result pivot table:
I want the result like this:
If you see, the year of the table is not increment, how to fix it?
the query:
select CASE WHEN (JENJAB like 'SEVP') THEN '4'
WHEN (JENJAB like 'EVP') THEN '4' WHEN (JENJAB like 'SVP') THEN '4'
WHEN (JENJAB like 'SVP') THEN '4' WHEN (JENJAB like 'AVP') THEN '3'
WHEN (JENJAB like 'AVP') THEN '2' END AS LEVEL_JOB, kompetensi,
level_kompetensi, tahun, job, jenjab from OL_ASSESSMENT_RESULT
where tahun in (select tahun from ( select distinct tahun
from OL_ASSESSMENT_RESULT order by tahun desc)
where ROWNUM <=3 ) and npp = $P{npp}
The result of query:

How can I set table colspan?

My question is that how I can set colspan value for a table footer column in iReport, in jrxml file.
I have to use iReport to create easily my PDF design. I send fields and parameters values from PHP via Tomcat. I don't use Java for create a dynamic jasper report.
That means I have to resolve my problem from jrxml.
Is it possible to make it?
You can't do a colspan as such but you can group the table columns in iReport (select more than 1 column in the table footer). Then remove the cells of the individual columns in the footer and add a cell for the "Group Header" in the footer.
All pure iReport/JRXML.
Detail part of xml:
<detail>
<band height="43" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="344" height="20"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{data_title}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement key="table" x="0" y="20" width="802" height="20"/>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="details">
<datasetParameter name="credit">
<datasetParameterExpression><![CDATA[$F{credit}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="debit_gross_sum">
<datasetParameterExpression><![CDATA[$F{debit_gross_sum}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="debit_net_sum">
<datasetParameterExpression><![CDATA[$F{debit_net_sum}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{details})]]></dataSourceExpression>
</datasetRun>
<jr:column width="12">
<jr:tableFooter height="15" rowSpan="1"/>
<jr:detailCell height="20" rowSpan="1"/>
</jr:column>
<jr:column width="48">
<jr:tableFooter height="15" rowSpan="1"/>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="48" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{time}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="106">
<jr:tableFooter height="15" rowSpan="1"/>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="106" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="130">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="130" height="15"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="130" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{guest_name}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="48">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="48" height="15"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="48" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{room}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="79">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="79" height="15"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="79" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{cachier_user}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="77">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="77" height="15"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="77" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{source_room}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="126">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="126" height="15"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="126" height="20"/>
<textElement>
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{source_guest_name}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="70">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="70" height="15"/>
<box rightPadding="0">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{debit_gross_sum}]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="70" height="20"/>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{debit_gross}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="70">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="70" height="15"/>
<box rightPadding="0">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{debit_net_sum}]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="70" height="20"/>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{debit_net}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="37">
<jr:tableFooter height="15" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="37" height="15"/>
<box>
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{credit}]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:detailCell height="20" rowSpan="1"/>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
I would like to close up from tableFotter 3. cell 4 cells.
Thank you Alex K!