How to introduce the page break after pre-defined number of rows in the jr:table component? - jasper-reports

I am using jasper report version 6.1 and wanted page break after pre-defined number of rows in the jr:table component. I have also tried doing the same in version 5 and it works fine but in version 6+ I am not able to do it.
Sharing the links which I followed if any one have other solution please let me know.
http://community.jaspersoft.com/wiki/ireport-how-introduce-page-break-after-pre-defined-number-rows-table-component
http://community.jaspersoft.com/questions/845487/inserting-break-table-print-only-10-rows-page-jasper-reports-372
This is what I have tried:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 -->
<!-- 2017-05-29T15:29:33 -->
<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_4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="957c1fea-8994-4195-9d7a-2bbf0baf7180">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Max apex"/>
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Dataset1" uuid="435d51b0-6d3e-442e-9a96-ae7412b12278">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Max apex"/>
<queryString>
<![CDATA[select * from dept]]>
</queryString>
<field name="DEPTNO" class="java.math.BigDecimal"/>
<field name="DNAME" class="java.lang.String"/>
<field name="LOC" class="java.lang.String"/>
<group name="DEPTNO">
<groupExpression><![CDATA[$F{DEPTNO}]]></groupExpression>
</group>
<group name="DNAME">
<groupExpression><![CDATA[$F{DNAME}]]></groupExpression>
</group>
<group name="LOC">
<groupExpression><![CDATA[$F{LOC}]]></groupExpression>
</group>
</subDataset>
<queryString>
<![CDATA[select * from dept]]>
</queryString>
<field name="DEPTNO" class="java.math.BigDecimal"/>
<field name="DNAME" class="java.lang.String"/>
<field name="LOC" class="java.lang.String"/>
<group name="DEPTNO">
<groupExpression><![CDATA[$F{DEPTNO}]]></groupExpression>
</group>
<group name="DNAME">
<groupExpression><![CDATA[$F{DNAME}]]></groupExpression>
</group>
<group name="LOC">
<groupExpression><![CDATA[$F{LOC}]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="145" splitType="Stretch">
<componentElement>
<reportElement positionType="FixRelativeToBottom" x="10" y="0" width="500" height="110" uuid="b37c89ae-600a-4fb8-ac64-e142bfe22e13"/>
<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="Dataset1" uuid="8f84378b-9508-4763-8265-69e68c41febe">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="100" uuid="00a00921-f5fa-4352-924c-f0531c919f71">
<jr:columnHeader style="Table_CH" height="30">
<staticText>
<reportElement x="0" y="0" width="100" height="30" uuid="d88580f8-05d2-4eb0-a098-00e877c58c39"/>
<text><![CDATA[DEPTNO]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="90" height="30" uuid="15fda94a-b686-4808-b55c-3e08a8e86187"/>
<textFieldExpression><![CDATA[$F{DEPTNO}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="72e58aec-00f1-4937-8600-b32a6010d4d6">
<jr:columnHeader style="Table_CH" height="30">
<staticText>
<reportElement x="0" y="0" width="130" height="30" uuid="942c89ca-e914-4809-bb18-3b7065b413f7"/>
<text><![CDATA[DNAME]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="130" height="30" uuid="8b936e63-5f84-4fd7-b21c-8c08fb9550a5"/>
<textFieldExpression><![CDATA[$F{DNAME}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="f312cbac-4554-492c-928f-dd84b5a55d42">
<jr:columnHeader style="Table_CH" height="30">
<staticText>
<reportElement x="0" y="0" width="120" height="30" uuid="ce385917-88aa-4e51-9cae-a7a142f78323"/>
<text><![CDATA[LOC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="120" height="30" uuid="0e43f425-558c-4001-9c44-ca14798bcb75"/>
<textFieldExpression><![CDATA[$F{LOC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>

The solution to use a a group expression inside the subdatset works perfectly fine also in jasper reports v6+.
Example (built from code and data from this answer)
Adding groupExpression to the subDataset to break to new page every 2 records ($V{REPORT_COUNT}-1)/2)
<subDataset name="tableDataset" uuid="7a53770f-0350-4a73-bfc1-48a5f6386594">
<field name="User" class="java.lang.String"/>
<field name="Rep" class="java.math.BigDecimal"/>
<group name="pageBreakGroup" isStartNewPage="true">
<groupExpression><![CDATA[(int)(($V{REPORT_COUNT}-1)/2)]]></groupExpression>
</group>
</subDataset>
Expand code snippet for full code.
<?xml version="1.0" encoding="UTF-8"?>
<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="reputation" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a88bd694-4f90-41fc-84d0-002b90b2d73e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="CVS"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="tableDataset" uuid="7a53770f-0350-4a73-bfc1-48a5f6386594">
<field name="User" class="java.lang.String"/>
<field name="Rep" class="java.math.BigDecimal"/>
<group name="pageBreakGroup" isStartNewPage="true">
<groupExpression><![CDATA[(int)(($V{REPORT_COUNT}-1)/2d)]]></groupExpression>
</group>
</subDataset>
<parameter name="displayRecordNumber" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[true]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="50">
<componentElement>
<reportElement key="table" style="table" x="0" y="0" width="555" height="47" uuid="76ab08c6-e757-4785-a43d-b65ad4ab1dd5"/>
<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="tableDataset" uuid="07e5f1c2-af7f-4373-b653-c127c47c9fa4">
<dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>
</datasetRun>
<jr:column width="90" uuid="918270fe-25c8-4a9b-a872-91299cddbc31">
<printWhenExpression><![CDATA[$P{displayRecordNumber}]]></printWhenExpression>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="5cd6da41-01d5-4f74-99c2-06784f891d1e"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Record number]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="30" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="30" uuid="5fe48359-0e7e-44b2-93ac-f55404189832"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="7979d8a2-4e3c-42a7-9ff9-86f8e0b164bc">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="61d5f1b6-7677-4511-a10c-1fb8a56a4b2a"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Username]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="30" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="30" uuid="a3cdb99d-3bf6-4c66-b50c-259b9aabfaef"/>
<box leftPadding="3" rightPadding="3"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{User}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="625e4e5e-5057-4eab-b4a9-c5b22844d25c">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="e1c07cb8-a44c-4a8d-8566-5c86d6671282"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Reputation]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="30" rowSpan="1">
<textField pattern="#,##0">
<reportElement x="0" y="0" width="90" height="30" uuid="6be2d79f-be82-4c7b-afd9-0039fb8b3189"/>
<box leftPadding="3" rightPadding="3"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Rep}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</title>
</jasperReport>
Result in JasperStudio version 6.2
As you can see 3 pages (2 records on each, total record count 5).

Related

How to create table with inner rows

How to obtain this situation (move the last column as new dynamic row) in jasper?
Jrxml code: https://pastebin.com/sMa1Cct2
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.8.0.final utlizzo versione della libreria JasperReports6.8.0-2ed8dfabb690ff337a5797129f2cd92902b0c87b -->
<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="template_Table" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1a0aa80b-dc07-4dca-bdbc-aa78eeb0d12b">
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="ItemDataset" uuid="2914f7c6-c2d7-448b-b0c1-090970e18ed6">
<queryString>
<![CDATA[]]>
</queryString>
<field name="descrizione" class="java.lang.String"/>
<field name="numero_depositanti" class="java.lang.String"/>
<field name="quantita" class="java.lang.String"/>
<field name="percentuale" class="java.lang.String"/>
<field name="conti" class="java.util.List"/>
<group name="Group1"/>
</subDataset>
<parameter name="ItemDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="256" splitType="Stretch">
<componentElement>
<reportElement x="0" y="0" width="555" height="200" uuid="7786bb05-503a-4b6a-991a-a7bcf3abad07">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
</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">
<datasetRun subDataset="ItemDataset" uuid="d3e1e03a-2c83-4436-9e50-79518bc3d337">
<dataSourceExpression><![CDATA[$P{ItemDataSource}]]></dataSourceExpression>
</datasetRun>
<jr:column width="75" uuid="dca8961f-ce2d-47ac-879c-b15847d170a9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna1"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="75" height="30" uuid="f60d1675-6fb6-4569-93ca-de32b3a8e861"/>
<text><![CDATA[Descrizione]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="75" height="30" uuid="f1de366a-b36f-4200-9b1e-7a0009be5373"/>
<textFieldExpression><![CDATA[$F{descrizione}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna2"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="140" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Numero depositanti]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="140" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{numero_depositanti}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="100" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna3"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="100" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Quantita]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="100" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{quantita}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="100" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna4"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="100" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Percentuale]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="100" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{percentuale}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna5"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="140" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Percentuale]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="140" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{conti}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
<band height="50">
<staticText>
<reportElement x="0" y="0" width="75" height="20" backcolor="#151515" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb6b"/>
<text><![CDATA[descrizione]]></text>
</staticText>
<staticText>
<reportElement x="151" y="0" width="100" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb68"/>
<text><![CDATA[quantita]]></text>
</staticText>
<staticText>
<reportElement x="226" y="0" width="75" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb69"/>
<text><![CDATA[percentuale]]></text>
</staticText>
</band>
</detail>
</jasperReport>
Playing around I found another possible way (without the data I can't confirm it working). :
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="template_Table" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1a0aa80b-dc07-4dca-bdbc-aa78eeb0d12b">
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="ItemDataset" uuid="2914f7c6-c2d7-448b-b0c1-090970e18ed6">
<queryString>
<![CDATA[]]>
</queryString>
<field name="descrizione" class="java.lang.String"/>
<field name="numero_depositanti" class="java.lang.String"/>
<field name="quantita" class="java.lang.String"/>
<field name="percentuale" class="java.lang.String"/>
<field name="conti" class="java.util.List"/>
<group name="Group1"/>
</subDataset>
<parameter name="ItemDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="256" splitType="Stretch">
<componentElement>
<reportElement x="0" y="0" width="555" height="200" uuid="7786bb05-503a-4b6a-991a-a7bcf3abad07">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
</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">
<datasetRun subDataset="ItemDataset" uuid="d3e1e03a-2c83-4436-9e50-79518bc3d337">
<dataSourceExpression><![CDATA[$P{ItemDataSource}]]></dataSourceExpression>
</datasetRun>
<jr:column width="75" uuid="dca8961f-ce2d-47ac-879c-b15847d170a9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna1"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="75" height="30" uuid="f60d1675-6fb6-4569-93ca-de32b3a8e861"/>
<text><![CDATA[Descrizione]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="60">
<textField>
<reportElement x="0" y="0" width="75" height="60" uuid="f1de366a-b36f-4200-9b1e-7a0009be5373"/>
<textFieldExpression><![CDATA[$F{descrizione}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="225" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna2"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="225" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Numero depositanti]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="60">
<textField>
<reportElement x="0" y="0" width="225" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{numero_depositanti}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="30" width="225" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{conti}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="101" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna3"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="101" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Quantita]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="60">
<textField>
<reportElement x="0" y="0" width="101" height="60" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{quantita}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="99" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna4"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="99" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Percentuale]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="60">
<textField>
<reportElement x="0" y="0" width="99" height="60" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{percentuale}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="55" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonna5"/>
<jr:tableHeader height="30" rowSpan="1"/>
<jr:detailCell height="60">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
<band height="50">
<staticText>
<reportElement x="0" y="0" width="75" height="20" backcolor="#151515" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb6b"/>
<text><![CDATA[descrizione]]></text>
</staticText>
<staticText>
<reportElement x="151" y="0" width="100" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb68"/>
<text><![CDATA[quantita]]></text>
</staticText>
<staticText>
<reportElement x="226" y="0" width="75" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb69"/>
<text><![CDATA[percentuale]]></text>
</staticText>
</band>
</detail>
</jasperReport>
The only option I see is, that you have to create a new table with only this one property.
Then you can layout it that it looks like one table:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="template_Table" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1a0aa80b-dc07-4dca-bdbc-aa78eeb0d12b">
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="ItemDataset" uuid="2914f7c6-c2d7-448b-b0c1-090970e18ed6">
<queryString>
<![CDATA[]]>
</queryString>
<field name="descrizione" class="java.lang.String"/>
<field name="numero_depositanti" class="java.lang.String"/>
<field name="quantita" class="java.lang.String"/>
<field name="percentuale" class="java.lang.String"/>
<field name="conti" class="java.util.List"/>
<group name="Group1"/>
</subDataset>
<parameter name="ItemDataSource" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="256" splitType="Stretch">
<componentElement>
<reportElement x="0" y="0" width="555" height="60" uuid="7786bb05-503a-4b6a-991a-a7bcf3abad07">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
</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">
<datasetRun subDataset="ItemDataset" uuid="d3e1e03a-2c83-4436-9e50-79518bc3d337">
<dataSourceExpression><![CDATA[$P{ItemDataSource}]]></dataSourceExpression>
</datasetRun>
<jr:column width="75" uuid="dca8961f-ce2d-47ac-879c-b15847d170a9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="75" height="30" uuid="f60d1675-6fb6-4569-93ca-de32b3a8e861"/>
<text><![CDATA[Descrizione]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="75" height="30" uuid="f1de366a-b36f-4200-9b1e-7a0009be5373"/>
<textFieldExpression><![CDATA[$F{descrizione}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="140" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Numero depositanti]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="140" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{numero_depositanti}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="100" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="100" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Quantita]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="100" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{quantita}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="105" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:tableHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="105" height="30" uuid="16679b95-2e6e-4ca1-b8b6-dd7b74267c56"/>
<text><![CDATA[Percentuale]]></text>
</staticText>
</jr:tableHeader>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="105" height="30" uuid="341e7faf-9680-4941-a9a4-ac78b8f4aae0"/>
<textFieldExpression><![CDATA[$F{percentuale}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="980fffb5-1088-47a6-b00f-b5d08b7093c9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:tableHeader height="30" rowSpan="1"/>
<jr:detailCell height="30"/>
</jr:column>
</jr:table>
</componentElement>
<componentElement>
<reportElement x="0" y="60" width="555" height="30" uuid="05eb78da-89c1-4af6-bdad-79a3b8ca819d">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
</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">
<datasetRun subDataset="ItemDataset" uuid="c27bd785-53a9-4bcc-a1cc-3950f707d796">
<dataSourceExpression><![CDATA[$P{ItemDataSource}]]></dataSourceExpression>
</datasetRun>
<jr:column width="75" uuid="7b446ae4-9502-48e3-afd5-6957e705f284">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:detailCell height="30"/>
</jr:column>
<jr:column width="345" uuid="06c2486d-3e7c-4b64-9282-e1c58541e69c">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="345" height="30" uuid="8a99019f-ad26-4182-ad81-e61b356dcefe"/>
<textFieldExpression><![CDATA[$F{conti}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
<band height="50">
<staticText>
<reportElement x="0" y="0" width="75" height="20" backcolor="#151515" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb6b"/>
<text><![CDATA[descrizione]]></text>
</staticText>
<staticText>
<reportElement x="151" y="0" width="100" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb68"/>
<text><![CDATA[quantita]]></text>
</staticText>
<staticText>
<reportElement x="226" y="0" width="75" height="20" uuid="3316e9fe-e7e7-4020-84d6-a8f16cd8eb69"/>
<text><![CDATA[percentuale]]></text>
</staticText>
</band>
</detail>
</jasperReport>

Create a table in iReports using XmlDataSource

I'm trying to create a table using XmlDataSource, but it neither printing the table structure nor showing the data. I'm using iReport 4.7.1. Kindly help.
What I have done is:
Created a new blank report
Created an xml datasource
Selected /sendDetail/results as the record node
Created a table with the selected fields
Below is the .jrxml file I'm using:
<?xml version="1.0" encoding="UTF-8"?>
<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="testReport2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a19f4e39-052a-483f-834a-5546d7626590">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<subDataset name="Dataset" uuid="601a324d-5c44-4688-b6d4-cf64b3869ba4">
<queryString language="xPath">
<![CDATA[/sendDetail/results]]>
</queryString>
<field name="results" class="java.lang.String">
<fieldDescription><![CDATA[child::text()]]></fieldDescription>
</field>
<field name="effDate" class="java.lang.String">
<fieldDescription><![CDATA[effDate]]></fieldDescription>
</field>
<field name="period" class="java.lang.String">
<fieldDescription><![CDATA[period]]></fieldDescription>
</field>
<field name="amount" class="java.lang.String">
<fieldDescription><![CDATA[amount]]></fieldDescription>
</field>
<field name="totalAmount" class="java.lang.String">
<fieldDescription><![CDATA[totalAmount]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
</subDataset>
<queryString language="xPath">
<![CDATA[/sendDetail/results]]>
</queryString>
<field name="effDate" class="java.lang.String">
<fieldDescription><![CDATA[effDate]]></fieldDescription>
</field>
<field name="period" class="java.lang.String">
<fieldDescription><![CDATA[period]]></fieldDescription>
</field>
<field name="amount" class="java.lang.String">
<fieldDescription><![CDATA[amount]]></fieldDescription>
</field>
<field name="totalAmount" class="java.lang.String">
<fieldDescription><![CDATA[totalAmount]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="65" splitType="Stretch">
<componentElement>
<reportElement uuid="9bed609a-a1cf-489d-a7b0-d322f0dfc9db" key="table 1" style="table 1" x="0" y="0" width="555" height="65"/>
<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="Dataset" uuid="33620359-7c04-4c08-9f6c-a18d9c5eb044">
<connectionExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_CONNECTION}).subDataSource("/sendDetail/results")]]></connectionExpression>
</datasetRun>
<jr:column uuid="9403d18c-6eec-447b-b8d2-c4973350060a" width="90">
<jr:columnHeader style="table 1_CH" height="30">
<staticText>
<reportElement uuid="b86bb6ed-aee3-40b0-976e-bc4c23408910" x="0" y="0" width="90" height="30"/>
<textElement/>
<text><![CDATA[effDate]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20">
<textField>
<reportElement uuid="de8b3535-74da-41b4-9f1d-7b66164bb0dc" x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{effDate}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="ee9a667a-8916-4d87-87b7-e256e90e7682" width="90">
<jr:columnHeader style="table 1_CH" height="30">
<staticText>
<reportElement uuid="3d173f1a-776d-415b-b241-ba4b4416a829" x="0" y="0" width="90" height="30"/>
<textElement/>
<text><![CDATA[period]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20">
<textField>
<reportElement uuid="9d6db0e4-6b13-4af3-9060-9057246e4e63" x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{period}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="d178a594-0faf-4a05-969c-2e17e65e9121" width="90">
<jr:columnHeader style="table 1_CH" height="30">
<staticText>
<reportElement uuid="41a37b97-55be-45cb-8279-354d460ded19" x="0" y="0" width="90" height="30"/>
<textElement/>
<text><![CDATA[amount]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20">
<textField>
<reportElement uuid="9e7714bc-3f8b-4d1e-8f77-ab8e9b14617f" x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{amount}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="e2cdad6a-fd55-4b35-9fc9-c6c93f8d3c0e" width="90">
<jr:columnHeader style="table 1_CH" height="30">
<staticText>
<reportElement uuid="b2d16a10-e73a-404d-8435-445664399482" x="0" y="0" width="90" height="30"/>
<textElement/>
<text><![CDATA[totalAmount]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20">
<textField>
<reportElement uuid="ea85d3b8-23e4-4c24-a611-d099b4a6d242" x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{totalAmount}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="e4a14c01-5159-41e2-b8eb-5fa333c8cc6c" width="90">
<jr:columnHeader style="table 1_CH" height="30">
<staticText>
<reportElement uuid="0beaa2b0-6b2c-46d5-97ff-36a1888bd7b8" x="0" y="0" width="90" height="30"/>
<textElement/>
<text><![CDATA[description]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20">
<textField>
<reportElement uuid="9b34870c-6013-47b5-af29-3380fbda1b25" x="0" y="0" width="90" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>
Below is the xml file:
<sendDetail>
<results>
<effDate>2015-10-20</effDate>
<period>DEC 1;2015 TO FEB 29;2016</period>
<amount>177.48</amount>
<totalAmount>177.48</totalAmount>
<description>Premium</description>
</results>
<results>
<effDate>2015-10-20</effDate>
<period>DEC 1;2015 TO FEB 29;2016</period>
<amount>-177.48</amount>
<totalAmount>0</totalAmount>
<description>Premium Cancellation</description>
</results>
<results>
<effDate>2015-07-20</effDate>
<period>SEP 1;2015 TO NOV 30;2015</period>
<amount>-177.48</amount>
<totalAmount>0</totalAmount>
<description>Premium Cancellation</description>
</results>
<results>
<effDate>2015-07-20</effDate>
<period>SEP 1;2015 TO NOV 30;2015</period>
<amount>177.48</amount>
<totalAmount>177.48</totalAmount>
<description>Premium</description>
</results>
</sendDetail>
You need to:
Change your main dataSet's queryString to:
<queryString language="xPath">
<![CDATA[/]]>
</queryString>
Replace your table's datasetRun declaration with:
<datasetRun subDataset="Dataset" uuid="33620359-7c04-4c08-9f6c-a18d9c5eb044">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/sendDetail/results")]]></dataSourceExpression>
</datasetRun>

Jasper - first page in blank

I'm inserting a table in my detail band, but if the value is too long in my textfield, the value is showed only in the second page and because of this the first page is blank.
How I can avoid empty first page on Ireport?
Below is my XML file:
<?xml version="1.0" encoding="UTF-8"?>
<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="RelatorioLicenca" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="089efa24-5b40-467a-b66a-053b77756f0c">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="0.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="dataset1" uuid="7664203f-829d-4951-8151-f0c3630108d3"/>
<subDataset name="dataset2" uuid="b05d44f7-3dfe-4fb8-9014-34c037e8bc28"/>
<subDataset name="dataset3" uuid="f3336d08-b905-45da-9cd2-871a08fbb704"/>
<subDataset name="dataset4" uuid="8a31051f-53a0-4438-8f36-655294512ecb"/>
<subDataset name="itemDataSet" uuid="07d68903-44a5-4148-9f4e-46a764459558">
<field name="html" class="java.lang.String"/>
</subDataset>
<parameter name="LOGO_IMAGE" class="java.io.InputStream"/>
<parameter name="BARRA_IMAGE" class="java.io.InputStream"/>
<parameter name="listCriterioQci" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="73" splitType="Stretch">
<image>
<reportElement x="137" y="2" width="284" height="54" uuid="07b821b9-797c-439c-92e8-1963c63ee2ae"/>
<imageExpression><![CDATA[$P{LOGO_IMAGE}]]></imageExpression>
</image>
<image>
<reportElement x="0" y="59" width="555" height="14" uuid="4b071978-b491-4bdb-b964-77cc3e378966"/>
<imageExpression><![CDATA[$P{BARRA_IMAGE}]]></imageExpression>
</image>
</band>
</title>
<detail>
<band height="218" splitType="Stretch">
<componentElement>
<reportElement key="table" style="table" positionType="Float" isPrintRepeatedValues="false" mode="Opaque" x="2" y="8" width="553" height="197" isPrintWhenDetailOverflows="true" forecolor="#FFFFFF" uuid="086200b3-e8f8-454d-84ef-d91dbe233d92"/>
<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="itemDataSet" uuid="376ddebe-37e7-49e4-9a3c-c12cdb054808">
<dataSourceExpression><![CDATA[$P{listCriterioQci}]]></dataSourceExpression>
</datasetRun>
<jr:column width="554" uuid="cc022176-90eb-4639-8818-85293cb2da05">
<jr:detailCell style="table" height="135" rowSpan="1">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="31" width="554" height="92" isPrintWhenDetailOverflows="true" uuid="75438790-5295-4508-b6fe-cae1b962ae1d"/>
<box>
<pen lineStyle="Solid" lineColor="#FFFFFF"/>
<topPen lineStyle="Solid" lineColor="#FFFFFF"/>
<leftPen lineStyle="Solid" lineColor="#FFFFFF"/>
<bottomPen lineStyle="Solid" lineColor="#FFFFFF"/>
<rightPen lineStyle="Solid" lineColor="#FFFFFF"/>
</box>
<textElement markup="html"/>
<textFieldExpression><![CDATA[$F{html}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="0" y="15" width="554" height="1" uuid="7a8ae78a-41c3-4612-aeff-4aa9bbfe74f5">
<printWhenExpression><![CDATA[new Boolean($F{html} != null)]]></printWhenExpression>
</reportElement>
</line>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<pageFooter>
<band height="21" splitType="Stretch">
<textField>
<reportElement mode="Opaque" x="342" y="4" width="170" height="13" uuid="26decbd6-15dd-4f66-99d7-132b5b54a889"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement mode="Opaque" x="514" y="4" width="40" height="13" uuid="e34184f8-e277-4ec3-9a69-0c07d0729e25"/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement x="1" y="4" width="211" height="13" uuid="68ea646b-0cef-4427-86b7-32f0f5bd47f8"/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="5" splitType="Stretch"/>
</summary>
</jasperReport>

JasperReport iReport: JRException: Error retrieving field value from bean

I'm trying to understand how iReport works and how to create a simple jrxml file.
The report has a title and header and the data should be in a table. When I try to check how the report looks like using the preview button, I could see the title and header but not the table (Please note that I use that I clicked the "Use default value" for all fields). When I did not use the default value, I get this error.
Error filling print... net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:809) 
    at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:156) 
    at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:400) 
    at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:151) 
Caused by: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name 
    at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:123) 
    at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:96) 
    at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:109) 
Caused by: java.lang.NoSuchMethodException: Unknown property 'name' on class 'class java.lang.String' 
    at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1322) 
    at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:770) 
    at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:846) 
    at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426) 
    at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:111) 
    ... 15 more  Print not filled. Try to use an EmptyDataSource...
I thought that maybe that problem has something to do with how I typed the data for List. Probably the format is wrong. This is how I typed the sample data
(myName, 5, Manila)
(Based on the screenshot, Is the format correct? I even tried enclosing it in a square bracket but I still get the same error.)
please note that I have 3 columns Name , Age , Address.
But in the error message I noticed this
Unknown property 'name' on class 'class java.lang.String' 
which makes me think that I did something wrong when I create the dataset. (Sorry if I used a wrong term).
Anyway, here's the xml generated by iReport.
<?xml version="1.0" encoding="UTF-8"?>
<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="firstReport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="597c0716-df6b-42ec-a7c8-863eb1b7174a">
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#7FFFD4">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFFFEA">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#7FFFD4">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#BFFFEA">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Table Dataset 2" uuid="208e382c-09df-484e-8d2d-a4eb4f4e48ba">
<field name="name" class="java.lang.String"/>
<field name="age" class="java.lang.String"/>
<field name="address" class="java.lang.String"/>
</subDataset>
<parameter name="companyName" class="java.lang.String"/>
<parameter name="date" class="java.util.Date"/>
<parameter name="bean" class="java.util.List"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="32" splitType="Stretch">
<staticText>
<reportElement x="182" y="0" width="184" height="25" uuid="fe64d4b4-efb1-4ed2-ae06-772728fc8b65"/>
<textElement>
<font fontName="Bookman Old Style" size="15" isBold="true"/>
</textElement>
<text><![CDATA[Chart Of Account List]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="58" splitType="Stretch">
<staticText>
<reportElement x="13" y="0" width="100" height="20" uuid="52ae4669-b47e-408c-aabc-e8f470a1d92b"/>
<text><![CDATA[Company]]></text>
</staticText>
<staticText>
<reportElement x="13" y="38" width="100" height="20" uuid="a27fe0e1-9fe6-423f-a006-46c51c7e3e5e"/>
<text><![CDATA[Date Exported]]></text>
</staticText>
<textField>
<reportElement x="113" y="0" width="100" height="20" uuid="1d600fa2-9de4-4999-9222-98a8bcb484f9"/>
<textFieldExpression><![CDATA[$P{companyName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="113" y="38" width="100" height="20" uuid="1147b818-90ae-4b41-a757-19a590db41d7"/>
<textFieldExpression><![CDATA[$P{date}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<componentElement>
<reportElement key="table 1" style="table 1" x="13" y="0" width="270" height="50" uuid="652523bf-b666-47bc-a1aa-fc20fb9e489a"/>
<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="Table Dataset 2" uuid="6fcb9950-2d3f-4752-b56d-df7bff1e6991">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{bean})]]></dataSourceExpression>
</datasetRun>
<jr:column width="90" uuid="ee62967c-3669-49fe-a70d-a588ae47439d">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="a0973bfe-815a-498e-8b25-c3320cfe0f62"/>
<text><![CDATA[Name]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="61d8309e-dd7d-4978-b171-9ae9144e2f5c"/>
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="76a9e313-d134-420e-898b-7f5f444c4efb">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="f79fdf71-a673-4d3a-8e10-b986d99b8e9b"/>
<text><![CDATA[Age]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="e4342bed-af9c-4541-9e57-a24485d0a94d"/>
<textFieldExpression><![CDATA[$F{age}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="5c38c250-d74e-440c-93cb-3fef8ad38157">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="4656a074-f345-483a-971b-b00c95746ec0"/>
<text><![CDATA[Address]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="f2cc3d1c-97ef-48c1-b6e4-a12acc4e67ad"/>
<textFieldExpression><![CDATA[$F{address}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>
1) What is wrong with the jrxml that I made? Did I supply a wrong formatted data to the table? Or there's just something wrong with how I did the report?
This was fixed by adding "new" keyword in the datasource expression. You will see datasource expression by right clicking table in the Report Inspector. "edit Table Datasource"

How to do group using table component, not fields?

The goal is to make something like that using groups
The problem is that I can construct it using fields, but when I export the report constructed from fields (like in most of tutorials) to Excel, it becomes a mess.
I want to use table component, maybe partly, just for the parts where row1, row2... etc are located, because tables are exported rather decently.
Is that possible at all?
If I add a table component into the details band, it shows the whole table for each group (all rows 1-9 are in each group, so I have no grouping at all), like here:
This is my XML file:
<?xml version="1.0" encoding="UTF-8"?>
<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="report1" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="8075ffe7-6e3e-430c-9792-0842e1047ee7">
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<subDataset name="New Dataset 1" uuid="6d70e59b-520c-4c3a-b122-fc299a1e36f3">
<queryString language="SQL">
<![CDATA[select * from test_table]]>
</queryString>
<field name="COLUMN1" class="java.lang.String"/>
<field name="INITIATOR" class="java.lang.String"/>
<field name="ID" class="java.lang.String"/>
<field name="URL" class="java.lang.String"/>
<field name="DOMAIN" class="java.lang.String"/>
</subDataset>
<queryString>
<![CDATA[select * from test_table]]>
</queryString>
<field name="COLUMN1" class="java.lang.String"/>
<field name="INITIATOR" class="java.lang.String"/>
<field name="ID" class="java.lang.String"/>
<field name="URL" class="java.lang.String"/>
<field name="DOMAIN" class="java.lang.String"/>
<group name="USER">
<groupExpression><![CDATA[$F{INITIATOR}]]></groupExpression>
<groupHeader>
<band height="20">
<textField>
<reportElement x="0" y="0" width="100" height="20" uuid="f3c7aeda-d5fc-4745-aa57-6b86527bca7d"/>
<textFieldExpression><![CDATA[$F{INITIATOR}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="82" splitType="Stretch">
<componentElement>
<reportElement key="table 1" style="table 1" x="0" y="0" width="802" height="80" uuid="1e1e5c70-7231-407c-8a21-8a8abe18004c"/>
<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="New Dataset 1" uuid="c1fc144a-34ea-4a3c-bad5-979e248dbdd5">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="164" uuid="6fc1588c-ff53-457e-9ded-bf2ef1499ef9">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="164" height="30" uuid="37471666-30cf-4fba-a25a-2341517a9ff8"/>
<text><![CDATA[COLUMN1]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="164" height="20" uuid="23a35d1a-1835-4f98-b948-2e20d170b7cb"/>
<textFieldExpression><![CDATA[$F{COLUMN1}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="143" uuid="3bb44350-b9a3-42f3-a4b4-24cc92c1ac7a">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="143" height="30" uuid="32882a4d-9af7-4d20-bffc-d97304f852ec"/>
<text><![CDATA[INITIATOR]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="143" height="20" uuid="624c6056-9c8d-469d-834e-052e7ba64205"/>
<textFieldExpression><![CDATA[$F{INITIATOR}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="145" uuid="fdc25f77-cbf8-437b-9599-8dac13c231c7">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="145" height="30" uuid="9def11e0-f333-4af6-acd2-87693f546b94"/>
<text><![CDATA[ID]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="145" height="20" uuid="bffecf39-515f-49fa-a2fd-dce3b899664a"/>
<textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="215" uuid="ebcc9292-c0f8-45d7-acfb-a0cd07411c06">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="215" height="30" uuid="119558f5-9f63-408d-88fe-685bff93420c"/>
<text><![CDATA[URL]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="215" height="20" uuid="57fb4ae3-2ef8-46f5-9078-189afba2cc6f"/>
<textFieldExpression><![CDATA[$F{URL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="134" uuid="f241a40c-8426-4b4f-ad01-fcda25e3891c">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="134" height="30" uuid="d3015f10-9258-4ac9-8e95-a00f450b751e"/>
<text><![CDATA[DOMAIN]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="134" height="20" uuid="fab1275a-7ae9-443b-8861-fa7c319e01b1"/>
<textFieldExpression><![CDATA[$F{DOMAIN}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
I have edited your jrxml. I passed id from the main query to the table component as parameter and used it in the query for where condition, so the table query will only return the rows which are related to the parent query id.
<?xml version="1.0" encoding="UTF-8"?>
<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="report1" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="125"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#EFF7FF"/>
</conditionalStyle>
</style>
<subDataset name="New Dataset 1">
<parameter name="id" class="java.lang.Integer">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select * from test_table where id = $P{id};]]>
</queryString>
<field name="COLUMN1" class="java.lang.String"/>
<field name="INITIATOR" class="java.lang.String"/>
<field name="ID" class="java.lang.String"/>
<field name="URL" class="java.lang.String"/>
<field name="DOMAIN" class="java.lang.String"/>
</subDataset>
<queryString>
<![CDATA[select * from test_table;]]>
</queryString>
<field name="COLUMN1" class="java.lang.String"/>
<field name="INITIATOR" class="java.lang.String"/>
<field name="ID" class="java.lang.String"/>
<field name="URL" class="java.lang.String"/>
<field name="DOMAIN" class="java.lang.String"/>
<group name="USER">
<groupExpression><![CDATA[$F{INITIATOR}]]></groupExpression>
<groupHeader>
<band height="20">
<textField>
<reportElement x="0" y="0" width="100" height="20"/>
<textFieldExpression><![CDATA[$F{INITIATOR}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="82" splitType="Stretch">
<componentElement>
<reportElement key="table 1" style="table 1" x="0" y="0" width="802" height="80"/>
<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="New Dataset 1">
<datasetParameter name="id">
<datasetParameterExpression><![CDATA[$F{ID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="164">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="164" height="30"/>
<text><![CDATA[COLUMN1]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="164" height="20"/>
<textFieldExpression><![CDATA[$F{COLUMN1}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="143">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="143" height="30"/>
<text><![CDATA[INITIATOR]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="143" height="20"/>
<textFieldExpression><![CDATA[$F{INITIATOR}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="145">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="145" height="30"/>
<text><![CDATA[ID]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="145" height="20"/>
<textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="215">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="215" height="30"/>
<text><![CDATA[URL]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="215" height="20"/>
<textFieldExpression><![CDATA[$F{URL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="134">
<jr:columnHeader style="table 1_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="134" height="30"/>
<text><![CDATA[DOMAIN]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="table 1_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 1_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="134" height="20"/>
<textFieldExpression><![CDATA[$F{DOMAIN}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>