Summing column values-variable not found error in ireport - sum

I am summing all values(vertical) in single column using variable, which I declared as below in code, but when I am running code, it gives error:
. variable not found.
I am printing this table in summary band, because when I am declaring it in details band, many pages are repeating with repeated tables.
<?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="intra_fho" language="groovy" pageWidth="648" pageHeight="792" columnWidth="608" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9a93052d-913c-448c-a2bd-956da96ec037">
<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="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>
<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>
<style name="table 2">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 2_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_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 3">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 3_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_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 4">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 4_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_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 5">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 5_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_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="585047d6-61a7-4b62-9dae-49e3ad3b2855">
<queryString>
<![CDATA[SELECT
intra_fho_final.`FirstName` AS intra_fho_final_FirstName,
intra_fho_final.`DoctorID` AS intra_fho_final_DoctorID,
intra_fho_final.`for_doctor` AS intra_fho_final_for_doctor,
intra_fho_final.`by_doctor` AS intra_fho_final_by_doctor,
intra_fho_final.`Net_Services_by_Physicians` AS intra_fho_final_Net_Services_by_Physicians,
intra_fho_final.`Value_of_Net_Services` AS intra_fho_final_Value_of_Net_Services
FROM
`intra_fho_final` intra_fho_final]]>
</queryString>
<field name="intra_fho_final_FirstName" class="java.lang.String"/>
<field name="intra_fho_final_DoctorID" class="java.lang.Integer"/>
<field name="intra_fho_final_for_doctor" class="java.math.BigDecimal"/>
<field name="intra_fho_final_by_doctor" class="java.math.BigDecimal"/>
<field name="intra_fho_final_Net_Services_by_Physicians" class="java.math.BigDecimal"/>
<field name="intra_fho_final_Value_of_Net_Services" class="java.math.BigDecimal"/>
</subDataset>
<queryString language="SQL">
<![CDATA[SELECT
intra_fho_final.`FirstName` AS intra_fho_final_FirstName,
intra_fho_final.`DoctorID` AS intra_fho_final_DoctorID,
intra_fho_final.`for_doctor` AS intra_fho_final_for_doctor,
intra_fho_final.`by_doctor` AS intra_fho_final_by_doctor,
intra_fho_final.`Net_Services_by_Physicians` AS intra_fho_final_Net_Services_by_Physicians,
intra_fho_final.`Value_of_Net_Services` AS intra_fho_final_Value_of_Net_Services
FROM
`intra_fho_final` intra_fho_final]]>
</queryString>
<field name="intra_fho_final_FirstName" class="java.lang.String"/>
<field name="intra_fho_final_DoctorID" class="java.lang.Integer"/>
<field name="intra_fho_final_for_doctor" class="java.math.BigDecimal"/>
<field name="intra_fho_final_by_doctor" class="java.math.BigDecimal"/>
<field name="intra_fho_final_Net_Services_by_Physicians" class="java.math.BigDecimal"/>
<field name="intra_fho_final_Value_of_Net_Services" class="java.math.BigDecimal"/>
<variable name="for_doctor" class="java.math.BigDecimal" incrementType="Column" calculation="Sum">
<variableExpression><![CDATA[$F{intra_fho_final_for_doctor}]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="49" splitType="Stretch">
<staticText>
<reportElement uuid="8a5981f1-7059-4834-ab1b-c0b1e23cba44" x="201" y="10" width="206" height="28"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="24"/>
</textElement>
<text><![CDATA[Intra-FHO Report]]></text>
</staticText>
</band>
</title>
<summary>
<band height="57" splitType="Stretch">
<componentElement>
<reportElement uuid="30b3af0e-8160-460f-b1c9-e3d5bce80cbe" key="table 5" style="table 5" stretchType="RelativeToBandHeight" x="56" y="6" width="496" height="44" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<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="79799bc4-801b-440c-a09b-bc24c0542297">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column uuid="47b87b0f-9b0a-405a-8bec-ff898a66036f" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="f7a46f3d-2297-487b-88e6-9150a1b1eca2" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[First Name]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<staticText>
<reportElement uuid="0a44ed1e-7ada-4e53-a0f1-f8e80215b921" x="0" y="0" width="90" height="30" backcolor="#19FFFF"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Total]]></text>
</staticText>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="6ee7fb55-7327-4386-ac9a-b9f134f87cac" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_FirstName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="dbfb1b17-68ce-4a59-869e-0d1a0783c53c" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="a497ced3-2a53-4cb7-a1bb-01761cff09e9" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[DoctorID]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="7ab80c20-bf8c-41ce-9758-0c23c3c31614" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_DoctorID}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="19ca94c6-4b15-43e0-9deb-7d0e4877c74e" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="0a9d6455-c731-4e97-8504-60573fbefb38" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Services for doctor]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textField>
<reportElement uuid="fc9cbc6f-8e58-458b-917b-9ddfd901e7b0" x="0" y="0" width="90" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$V{for_doctor}]]></textFieldExpression>
</textField>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="86d7773c-0639-46a4-bd36-1b1ae44ca117" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_for_doctor}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="1bba8b0e-1dbb-42fe-99c8-c06ccaeaffd1" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="70ba240b-7471-40d0-89af-ffb486c40426" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Services by doctor]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="3dee1b58-18d9-46d1-9f15-83187acbb958" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_by_doctor}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="c74af907-1849-414a-af92-e2ce8ae993b9" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="e479699f-be34-4b02-ac94-04d081f1f701" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Net Services by Physicians]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="a1a6b8e4-fde3-4420-98c6-870f22b1227c" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_Net_Services_by_Physicians}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="beb168ea-b1a8-4ac9-8aae-eb5c15e983f5" width="90">
<jr:columnHeader style="table 5_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="b29fb3a0-5b2a-4ad3-b3c1-9624a2690ac9" x="0" y="0" width="90" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Value of Net Services]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1">
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
</jr:columnFooter>
<jr:detailCell style="table 5_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="2e6374e8-8e70-4823-97d9-81599f44016f" x="0" y="0" width="90" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{intra_fho_final_Value_of_Net_Services}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
</jasperReport>

Related

Why is NullPointer Exception thrown in isSplitTypePreventInhibited when contents of table cell overflow to next page?

Issue
In a Jasperreport, if the content of table detail cell or header cell is large to not fit in one page, a runtime NullPointer exception is thrown. This behavior is observed in both Jasperreports Studio as well as Jasperreports Server.
Version
6.6 and 6.7
JRXML
For simplicity, empty dataset is used. Important thing here is that the Text
field needs to have its Stretch With Overflow property set to True and large amount of data needs to be displayed which will force the table cell to grow beyond the page height.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Table_Based" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="66519d71-4f27-4833-9a1d-c9b72e811f0c">
<property name="template.engine" value="tabular_template"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<style name="Table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
<topPen lineWidth="1.0" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<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="tableDataset" uuid="bcc32bbf-2279-43e0-8149-66ee3e913b5e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<queryString language="SQL">
<![CDATA[]]>
</queryString>
</subDataset>
<subDataset name="Dataset1" uuid="13d74fad-eb9b-446f-a81d-55b8cf6ea0db">
<queryString>
<![CDATA[]]>
</queryString>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="113" splitType="Stretch">
<staticText>
<reportElement style="Title" x="270" y="0" width="263" height="62" uuid="a080d2ca-6207-4d8e-87c9-d3b61fb495a9"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Report Title]]></text>
</staticText>
<staticText>
<reportElement style="SubTitle" x="303" y="62" width="196" height="22" uuid="0d849401-f944-4163-9df0-f69408a0618a"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[Report SubTitle]]></text>
</staticText>
</band>
</title>
<summary>
<band height="112" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<componentElement>
<reportElement stretchType="ElementGroupHeight" x="0" y="0" width="802" height="112" isPrintWhenDetailOverflows="true" uuid="f3767496-0434-4f42-862b-5839d580e423">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
</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="Dataset1" uuid="e2733267-966b-4b9b-924a-4bbec63e6b35">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]></dataSourceExpression>
</datasetRun>
<jr:column width="200" uuid="a3e3c62f-3558-42a1-a701-ad31853970a9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="200" height="30" uuid="56f1cfe1-76be-4cd4-a4ba-5fe3e56b1a2e"/>
<textElement>
<font size="20"/>
</textElement>
<text><![CDATA[Number]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="40" rowSpan="1">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="ElementGroupHeight" x="0" y="0" width="200" height="40" uuid="bdcc75f5-e9d8-4013-80e7-d22b346d694b"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="300" uuid="e2eaa014-ebfd-4795-b752-476ca2fa8f0b">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="300" height="30" uuid="5d807608-f7ce-4e00-a3e5-5b29bb3228a7"/>
<textElement>
<font size="20"/>
</textElement>
<text><![CDATA[Text]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="40">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
<reportElement positionType="Float" stretchType="ElementGroupHeight" x="0" y="0" width="300" height="40" isPrintWhenDetailOverflows="true" uuid="e7d6d343-cd79-4293-8ccd-0b8af33ea962"/>
<textElement>
<paragraph lineSpacing="1_1_2"/>
</textElement>
<textFieldExpression><![CDATA[UPPER("qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm")]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
Exception
net.sf.jasperreports.engine.JRException: java.lang.NullPointerException
at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:536)
at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$17(ReportController.java:511)
at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:429)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.lang.NullPointerException
at net.sf.jasperreports.engine.fill.FillerSubreportParent.isSplitTypePreventInhibited(FillerSubreportParent.java:116)
at net.sf.jasperreports.engine.fill.JRFillBand.isSplitTypePreventInhibited(JRFillBand.java:633)
at net.sf.jasperreports.engine.fill.JRFillBand.isSplitTypePreventInhibited(JRFillBand.java:612)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2589)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:813)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:615)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:432)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:818)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
This is a bug starting probably from version 6.5.1 but should be fixed in version 6.7
The bug report is https://community.jaspersoft.com/jasperreports-library/issues/10451
I tested your report in JasperSoftStudio v 6.6 and I can confirm the bug, however compiling your report with Jasper Reports lib v 6.7 in java using the following code.
JasperReport report = JasperCompileManager.compileReport("pathTo.jrxml");
JasperPrint jasperPrint = JasperFillManager.fillReport(report, new HashMap<String, Object>(), new JREmptyDataSource(1));
JRPdfExporter exporter = new JRPdfExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput("pdf/SplitTest.pdf"));
SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration();
exporter.setConfiguration(configuration);
exporter.exportReport();
The bug can not be confirmed
Conclusion, this bug seems solved in version 6.7, make sure to do the correct test using version 6.7 or use a version prior to 6.5.1

how to decrease jrxml band detail height dynamically

I have a band with 2 list element based. If both list have data PDF generated properly but if 1 list is empty band height doesn't decrease and places white blanks in PDF.
<?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="liberty_new_bill_format" pageWidth="595" pageHeight="842" columnWidth="571" leftMargin="12" rightMargin="12" topMargin="12" bottomMargin="12" uuid="b6691099-6e36-4db6-a00d-f7d0d2167bd6">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<subDataset name="LW_IDD_CALL" uuid="48484a78-7d0d-4b22-86bd-9ebd1daac462">
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["D:\\Projects\\BE5.0.0\\repository\\Bill Export Format\\"]]></defaultValueExpression>
</parameter>
<parameter name="ID_USERNAME" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/custominfo/multiplerecord[#type="LW_CALL_DETAIL"]/record]]>
</queryString>
<field name="CALLDATETIME" class="java.lang.String">
<fieldDescription><![CDATA[#CALLDATETIME]]></fieldDescription>
</field>
<field name="CALLSECTION" class="java.lang.String">
<fieldDescription><![CDATA[#CALLSECTION]]></fieldDescription>
</field>
<field name="CALLTYPE" class="java.lang.String">
<fieldDescription><![CDATA[#CALLTYPE]]></fieldDescription>
</field>
<field name="COUNTRY" class="java.lang.String">
<fieldDescription><![CDATA[#COUNTRY]]></fieldDescription>
</field>
<field name="DURATIONMIN" class="java.lang.String">
<fieldDescription><![CDATA[#DURATIONMIN]]></fieldDescription>
</field>
<field name="DURATIONSEC" class="java.lang.String">
<fieldDescription><![CDATA[#DURATIONSEC]]></fieldDescription>
</field>
<field name="PHONENO" class="java.lang.String">
<fieldDescription><![CDATA[#PHONENO]]></fieldDescription>
</field>
<field name="RATE" class="java.lang.String">
<fieldDescription><![CDATA[#RATE]]></fieldDescription>
</field>
<field name="REFUNDEXISTS" class="java.lang.String">
<fieldDescription><![CDATA[#REFUNDEXISTS]]></fieldDescription>
</field>
<field name="USAGEKB" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEKB]]></fieldDescription>
</field>
<field name="USAGEMB" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEMB]]></fieldDescription>
</field>
<field name="USAGEAMOUNT" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEAMOUNT]]></fieldDescription>
</field>
<field name="LWFORMATPATTERN" class="java.lang.String">
<fieldDescription><![CDATA[/custominfo/singlerecord/#LWFORMATPATTERN]]></fieldDescription>
</field>
<field name="LWMINORUNIT" class="java.lang.String">
<fieldDescription><![CDATA[/custominfo/singlerecord/#LWMINORUNIT]]></fieldDescription>
</field>
<variable name="CDR_COUNT" class="java.lang.Integer" resetType="None" calculation="Count">
<initialValueExpression><![CDATA[1]]></initialValueExpression>
</variable>
<filterExpression><![CDATA[$F{CALLSECTION}.equals("VOICEIDD")]]></filterExpression>
</subDataset>
<subDataset name="LW_IDD_GLOBAL_SMS" uuid="428c32be-39c8-425e-ba21-10f73f94cdbf">
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["D:\\Projects\\BE5.0.0\\repository\\Bill Export Format\\"]]></defaultValueExpression>
</parameter>
<parameter name="ID_USERNAME" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/custominfo/multiplerecord[#type="LW_CALL_DETAIL"]/record]]>
</queryString>
<field name="LWMINORUNIT" class="java.lang.String">
<fieldDescription><![CDATA[/custominfo/singlerecord/#LWMINORUNIT]]></fieldDescription>
</field>
<field name="LWFORMATPATTERN" class="java.lang.String">
<fieldDescription><![CDATA[/custominfo/singlerecord/#LWFORMATPATTERN]]></fieldDescription>
</field>
<field name="CALLDATETIME" class="java.lang.String">
<fieldDescription><![CDATA[#CALLDATETIME]]></fieldDescription>
</field>
<field name="CALLSECTION" class="java.lang.String">
<fieldDescription><![CDATA[#CALLSECTION]]></fieldDescription>
</field>
<field name="CALLTYPE" class="java.lang.String">
<fieldDescription><![CDATA[#CALLTYPE]]></fieldDescription>
</field>
<field name="COUNTRY" class="java.lang.String">
<fieldDescription><![CDATA[#COUNTRY]]></fieldDescription>
</field>
<field name="DURATIONMIN" class="java.lang.String">
<fieldDescription><![CDATA[#DURATIONMIN]]></fieldDescription>
</field>
<field name="DURATIONSEC" class="java.lang.String">
<fieldDescription><![CDATA[#DURATIONSEC]]></fieldDescription>
</field>
<field name="PHONENO" class="java.lang.String">
<fieldDescription><![CDATA[#PHONENO]]></fieldDescription>
</field>
<field name="RATE" class="java.lang.String">
<fieldDescription><![CDATA[#RATE]]></fieldDescription>
</field>
<field name="REFUNDEXISTS" class="java.lang.String">
<fieldDescription><![CDATA[#REFUNDEXISTS]]></fieldDescription>
</field>
<field name="USAGEKB" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEKB]]></fieldDescription>
</field>
<field name="USAGEMB" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEMB]]></fieldDescription>
</field>
<field name="USAGEAMOUNT" class="java.lang.String">
<fieldDescription><![CDATA[#USAGEAMOUNT]]></fieldDescription>
</field>
<variable name="CDR_COUNT" class="java.lang.Integer" resetType="None" calculation="Count">
<initialValueExpression><![CDATA[1]]></initialValueExpression>
</variable>
<filterExpression><![CDATA[$F{CALLSECTION}.equals("SMSIDD")]]></filterExpression>
</subDataset>
<queryString language="xPath">
<![CDATA[/custominfo]]>
</queryString>
<field name="LWFORMATPATTERN" class="java.lang.String">
<fieldDescription><![CDATA[singlerecord/#LWFORMATPATTERN]]></fieldDescription>
</field>
<field name="LWMINORUNIT" class="java.lang.String">
<fieldDescription><![CDATA[singlerecord/#LWMINORUNIT]]></fieldDescription>
</field>
<field name="SMSIDDAMOUNT" class="java.lang.String">
<fieldDescription><![CDATA[singlerecord/#SMSIDDAMOUNT]]></fieldDescription>
</field>
<field name="VOICEIDDAMOUNT" class="java.lang.String">
<fieldDescription><![CDATA[singlerecord/#VOICEIDDAMOUNT]]></fieldDescription>
</field>
<variable name="IDD_AMOUNT_SUM" class="java.lang.Double" calculation="Sum">
<variableExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) + Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" ))]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band/>
</columnHeader>
<detail>
<band height="182" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="26" y="12" width="515" height="170" isRemoveLineWhenBlank="true" uuid="7cb21acd-38f6-4987-9ae9-a5957b70f88c"/>
<box>
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
</box>
<frame>
<reportElement mode="Opaque" x="0" y="0" width="515" height="27" isRemoveLineWhenBlank="true" backcolor="#F0F0F0" uuid="7a36219e-de1d-461c-b90b-b0ce10791200"/>
<staticText>
<reportElement mode="Transparent" x="6" y="0" width="116" height="27" forecolor="#000000" backcolor="#FFFFFF" uuid="afa2f370-fd5f-490f-9c62-7ce5ecbe86bd"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Open Sans Extrabold" size="11" isBold="true"/>
</textElement>
<text><![CDATA[Data]]></text>
</staticText>
</frame>
<frame>
<reportElement x="0" y="40" width="515" height="57" isRemoveLineWhenBlank="true" uuid="3b661c38-6d27-441e-b137-c2054790863d">
<printWhenExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
</reportElement>
<staticText>
<reportElement mode="Transparent" x="325" y="21" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="d89d85f3-6c4e-4033-9bdd-0d3eb4da5017"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Phone #]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="7" y="21" width="100" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="b086e195-0b0b-4d64-9545-1deb2ca5f10f"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Date & Time]]></text>
</staticText>
<componentElement>
<reportElement positionType="Float" x="0" y="37" width="515" height="20" isRemoveLineWhenBlank="true" uuid="f19ffb57-efe4-4c20-84f8-2b0de599a0e3"/>
<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="LW_IDD_CALL" uuid="247b3030-df73-4c6a-9ca8-3ada738c308f">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)
$P{REPORT_DATA_SOURCE}).dataSource("/custominfo/multiplerecord[#type='LW_CALL_DETAIL']/record")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="20" width="515">
<textField>
<reportElement x="7" y="0" width="100" height="20" uuid="0f79a5c5-2964-481c-9192-963b630d05c7"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{CALLDATETIME}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="402" y="0" width="46" height="20" uuid="92bc22ad-6a29-4e3b-858d-261755960bbb"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{RATE}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT})))) + "/min"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="465" y="0" width="45" height="20" uuid="4cdad71e-93f6-4692-9bec-3eb427551e5c"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{USAGEAMOUNT}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT}))))]]></textFieldExpression>
</textField>
<textField>
<reportElement x="325" y="0" width="60" height="20" uuid="a4ec29dd-a2ee-47f6-a042-9070b29edaff"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PHONENO}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="170" y="0" width="110" height="20" uuid="1ff085d3-3a74-402b-adf1-254d26dd87eb"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{COUNTRY}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="110" y="0" width="50" height="20" uuid="8f7f0b18-8d85-42fe-9078-aac4db6834cb"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[new DecimalFormat("#,##00").format((Double.parseDouble($F{DURATIONMIN}.replace( " ", "0" )))) + ":" +new DecimalFormat("#,##00").format((Double.parseDouble($F{DURATIONSEC}.replace( " ", "0" ))))]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement mode="Transparent" x="401" y="21" width="46" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="384a4fa0-f294-4f52-9f6e-80ca0570ceff"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Rate]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="110" y="21" width="50" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fc4734-c8e4-4aaf-9ff4-bc1638a6f5a5"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Duration]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="170" y="21" width="110" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="16ff4b2c-8087-4f52-8533-12d8f15263d7"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Country]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="465" y="21" width="45" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a023ec4d-97aa-4a40-8408-673e5d4f726d"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Amount]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="7" y="0" width="116" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="0e87bb45-f29a-4a50-b9d1-846f1d7ae575"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="9" isBold="true"/>
</textElement>
<text><![CDATA[IDD Calls]]></text>
</staticText>
</frame>
<frame>
<reportElement positionType="Float" x="0" y="100" width="515" height="10" isRemoveLineWhenBlank="true" uuid="0ccd7e2c-e134-4964-8b57-38fdd6ae78d3">
<printWhenExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) > 0 && Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
</reportElement>
<line>
<reportElement x="12" y="5" width="491" height="1" uuid="fab0c382-b32d-4809-8078-668a82dd86eb"/>
</line>
</frame>
<frame>
<reportElement positionType="Float" x="0" y="115" width="515" height="55" isRemoveLineWhenBlank="true" uuid="215cc558-db31-40ab-ba16-50b0d7b3b77a">
<printWhenExpression><![CDATA[Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
</reportElement>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<staticText>
<reportElement mode="Transparent" x="324" y="21" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a67a56df-8e16-45e5-88fa-91c9e4a26063"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Phone #]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="7" y="21" width="100" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="ec0e8108-c5e4-45c0-ba77-1b8f3373ac9e"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Date & Time]]></text>
</staticText>
<componentElement>
<reportElement positionType="Float" x="0" y="36" width="515" height="18" isRemoveLineWhenBlank="true" uuid="785a5bd6-9654-4f46-aed3-d6c0d9b8a10c"/>
<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="LW_IDD_GLOBAL_SMS" uuid="0ed48425-e6d9-43c5-bc52-d117944c13a6">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)
$P{REPORT_DATA_SOURCE}).dataSource("/custominfo/multiplerecord[#type='LW_CALL_DETAIL']/record")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="18" width="515">
<textField>
<reportElement x="7" y="0" width="100" height="18" uuid="0744b38a-7fe9-4b59-82d0-28779b2136bb"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{CALLDATETIME}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="465" y="0" width="45" height="18" uuid="4352e775-ad18-4207-a28b-01c828971608"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{USAGEAMOUNT}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT}))))]]></textFieldExpression>
</textField>
<textField>
<reportElement x="325" y="0" width="60" height="18" uuid="be557830-7c4c-4125-a14a-a341cf8b1499"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PHONENO}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="170" y="0" width="110" height="18" uuid="06bc7ad5-5d31-4143-9525-12dedb210239"/>
<textElement verticalAlignment="Middle">
<font fontName="Open Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{COUNTRY}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement mode="Transparent" x="465" y="21" width="45" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a758b1c2-29f7-4d18-af29-e262330fff2c"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Amount]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="170" y="21" width="110" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="367c8854-61db-4320-8712-508366f66bfa"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Country]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="6" y="0" width="116" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="774c12ff-1e22-42d1-adb7-4493b49f10e1"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Open Sans" size="9" isBold="true"/>
</textElement>
<text><![CDATA[Global SMS]]></text>
</staticText>
</frame>
</frame>
</band>
<band height="119">
<frame>
<reportElement positionType="Float" mode="Opaque" x="26" y="22" width="515" height="85" isRemoveLineWhenBlank="true" uuid="9b01e260-764e-460d-9741-d2f0ae1216f3"/>
<box>
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
</box>
<frame>
<reportElement mode="Opaque" x="0" y="0" width="515" height="27" isRemoveLineWhenBlank="true" backcolor="#F0F0F0" uuid="1b389123-b4b6-446b-abd1-67185b88eaf8"/>
<staticText>
<reportElement mode="Transparent" x="6" y="0" width="116" height="27" forecolor="#000000" backcolor="#FFFFFF" uuid="d3813577-f9cd-478b-9604-0416ef46254b"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Open Sans Extrabold" size="11" isBold="true"/>
</textElement>
<text><![CDATA[Charges]]></text>
</staticText>
</frame>
</frame>
</band>
</detail>
<columnFooter>
<band/>
</columnFooter>
<pageFooter>
<band height="46" splitType="Stretch"/>
</pageFooter>
We are using xml data source for this.
<?xml version = '1.0' encoding = 'UTF-8'?><custominfo><singlerecord ACCOUNTNAME="BHADRINATH RAMACHANDRAN" ACCOUNTNUMBER="LW555358" ACCOUNTTYPEID="ACT06" ADDONDATAAMOUNT="600" ADDONDATAQUOTA="1" ADDONSMSAMOUNT="0" ADDONSMSQUOTA="0" ADDONVOICEAMOUNT="0" ADDONVOICEQUOTA="0" ADDRESS="Liberty Wireless #221 Henderson Road, #06-04 Singapore 310231" ADDRESS1="Liberty Wireless #221 Henderson Road, #06-04" ADDRESS2="Liberty Wireless, #221, Henderson Road;06;04;" ADDRESSTYPEID="ADT02" ADJUSTMENT="0" ADJUSTMENTAMOUNT="0" ADJUSTMENT_AMOUNT="0" ADVANCEPAYMENTAMOUNT="0" ADVANCEPERIOD="01-31 May 2017" ADVANCE_PAYAMOUNT="0" ADVANCE_PAYAMOUNT_DATE="" ADV_FROMDATE="01 May 2017" ADV_TODATE="31 May 2017" ALIAS="SGD" AUTOBOOSTAMOUNT="0" AUTOBOOSTDATAUSED="0" AUTOBOOSTQUOTA="0" AUTO_BOOST_DATA="0" AUTO_BOOST_USAGE="0" AUTO_TOPUP_AMOUNT="0" BASEAMOUNT="2800" BASEDATAQUOTA="3" BASEDATAUSED="2.6" BASESMSQUOTA="0" BASEVOICEQUOTA="100" BASE_AMOUNT="2800" BASE_COMPONENT_DATA_VOLUME="8.25" BASE_DATA_VOLUME="3" BASE_SMS_COUNT="0" BASE_USAGE="2.54" BASE_VOICE_MIN="0" BILLAMOUNT="4205" BILLDATE="01 May 2017" BILLINGAREANAME="Default" BILLPERIOD="01-30 Apr 2017" BONUSDATAUSED="4.2" BONUSQUOTA="3.1" BONUS_DATA="4348" BONUS_USAGE="4340" BOOSTAMOUNT="0" BOOSTDATAUSED="0" BOOSTQUOTA="0" BOOST_DATA="0" BOOST_ONLY_AMOUNT="0" BOOST_USAGE="0" CIRCLECREDITAMOUNT="0" CITYNAME="Singapore" COMPONENT_AMOUNT="600" COMPONENT_DATA_AMOUNT="600" COMPONENT_DATA_VOLUME="1" COMPONENT_SMS_AMOUNT="0" COMPONENT_SMS_COUNT="0" COMPONENT_VOICE_AMOUNT="0" COMPONENT_VOICE_MIN="0" COUNTRYNAME="Singapore" CREATEDATE="27 Apr 2017" CURRENCYNAME=" " CURRENTBILLCHARGE="4205" CURR_BASE_DATA_VOLUME="3" CURR_BASE_SMS_COUNT="0" CURR_BASE_VOICE_MIN="100" CURR_BONUS_DATA="3.1" CURR_COMPONENT_DATA_VOLUME="1" CURR_COMPONENT_SMS_COUNT="0" CURR_COMPONENT_VOICE_MIN="0" DATAROAMAMOUNT="0" DATA_ROAMING_AMOUNT="0" DEBITDOCUMENTID="DBD000702898" DEBITDOCUMENTNUMBER="REG0000001377872" DEBITPAYMENTAMOUNT="4525" DEBIT_PAYAMOUNT="4525" DEBIT_PAYAMOUNT_DATE="07 Apr 2017" DEPOSITCHARGE="0" DEPOSITPAID="0" DUEDATE="08 May 2017" EMAILID="bhadrinath#circles.asia" EXADJUSTEDAMOUNT="0" EXDEPOSIT="0" EXDISCOUNT="0" EXDISCOUNTABLE="4205" EXDISCOUNTED="0" EXLATEPAYMENTAMOUNT="0" EXPREVIOUSBALANCEAMOUNT="0" EXPREVIOUSBILLAMOUNT="4525" EXPREVIOUSCREDITAMOUNT="0" EXPREVIOUSDEBITAMOUNT="0" EXPREVIOUSPAYMENTAMOUNT="4525" EXROUNDEDAMOUNT="0" EXROUNDINGAMOUNT="0" EXSUBTOTAL="3971" EXSURCHARGE="0" EXTAX="234" EXTAXABLE="0" EXTOTALAMOUNT="4205" EXTOTALDUE="4205" EXTOTALEARLYPAYMENTAMOUNT="0" EXTOTALLATEPAYMENTAMOUNT="4205" EXTOTALUNROUNDEDBILLAMOUNT="0" FORMATPATTERN="#,##0.00" FROMDATE="01 Apr 2017" GST="234" HOME_IC_AMOUNT="0" HOME_IC_MIN="0" HOME_OG_AMOUNT="759.5" HOME_OG_MIN="6" HOME_USAGE_VOICE_AMOUNT="0" HOME_USAGE_VOICE_MIN="0" IDD_BUDGET_AMOUNT="0" IDD_BUDGET_MIN="0" IDD_BUDGET_SEC="0" IDD_NORMAL_AMOUNT="760" IDD_NORMAL_MIN="5" IDD_NORMAL_SEC="54" IDD_USAGE_SMS_AMOUNT="0" IDD_USAGE_SMS_COUNT="0" IMG=" " INVOICENUMBER="REG0000001377872" LASTBILLDATE="01 Apr 2017" LOCALMMSAMOUNT="0" LOCALMMSCOUNT="0" LOCALSMSAMOUNT="0" LOCALSMSCOUNT="0" LOCALVOICEAMOUNTUSED="0" LOCALVOICEMINUSED="0" LOCAL_USAGE_AMOUNT="0" LOCAL_USAGE_DATA_VOLUME="6.92" LOCAL_USAGE_MMS_AMOUNT="0" LOCAL_USAGE_MMS_COUNT="0" LOCAL_USAGE_SMS_AMOUNT="0" LOCAL_USAGE_SMS_COUNT="0" LWACCOUNTNUMBER="LW555358" LWBILLDATE="01 May 2017" LWFORMATPATTERN="#,##0.00" LWMINORUNIT="2" LWTOTALTAXEXEMPTION="604.55" MAJORNAME="SGD" MAJORSYMBOL="$" MINORUNIT="2" MOBILENO="87423009" NAME="BHADRINATH RAMACHANDRAN" NONRECCHARGE="0" OC_AMOUNT="0" ONETIMEAMOUNT="0" PLUSAMOUNT="200" PLUS_AMOUNT="200" PREVIOUSBILLAMOUNT="4525" PRE_BASE_AMOUNT="0" PRE_BASE_DATA="3" PRE_BASE_SMS="0" PRE_BASE_VOICE="0" PRE_COMPONENT_DATA="1" PRE_COMPONENT_DATA_AMOUNT="0" PRE_COMPONENT_SMS="0" PRE_COMPONENT_SMS_AMOUNT="0" PRE_COMPONENT_VOICE="0" PRE_COMPONENT_VOICE_AMOUNT="0" PROADDONDATAAMOUNT="0" PROADDONDATAQUOTA="1" PROADDONSMSAMOUNT="0" PROADDONSMSQUOTA="0" PROADDONVOICEAMOUNT="0" PROADDONVOICEQUOTA="0" PROBASEAMOUNT="0" PROBASEDATAQUOTA="3" PROBASESMSQUOTA="0" PROBASEVOICEQUOTA="0" PROBONUSQUOTA="4.2" PRS_AMOUNT="0" RECCHARGE="3365" RECFIXRECCHARGE="0" ROAMING_USAGE_AMOUNT="0" SMSIDDAMOUNT="0" SMSROAMAMOUNT="0" SMS_ROAMING_AMOUNT="0" SMS_ROAMING_COUNT="0" SPECIAL_USAGE_AMOUNT="759.5" STATENAME="Singapore" TODATE="30 Apr 2017" TOTALCREDIT="0" TOTALDEBIT="0" TOTALTAXEXEMPTION="604.55" TXT="Please login to www.example.com to pay your bill." UNLIMITEDICCALLSAMOUNT="0" USAGECHARGE="606" USERNAME="BHADRINATH RAMACHANDRAN" VOICEIDDAMOUNT="759.5" VOICEROAMAMOUNT="0" VOICE_ROAMING_AMOUNT="0" ZIP="310231"/><multiplerecord type="LW_CALL_DETAIL">
<record CALLDATETIME="10 Apr 2017 - 22:44" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="0" PHONENO="919444281907" RATE="150" REFUNDEXISTS="N" USAGEAMOUNT="150" USAGEKB="0" USAGEMB="0"/>
<record CALLDATETIME="19 Apr 2017 - 06:37" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="Philippines" DURATIONMIN="1" DURATIONSEC="0" PHONENO="639175620965" RATE="90" REFUNDEXISTS="N" USAGEAMOUNT="90" USAGEKB="0" USAGEMB="0"/>
<record CALLDATETIME="24 Apr 2017 - 16:31" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="HongKong" DURATIONMIN="1" DURATIONSEC="0" PHONENO="85239704983" RATE="70.0000000000000000000000000000000000002" REFUNDEXISTS="N" USAGEAMOUNT="70" USAGEKB="0" USAGEMB="0"/>
<record CALLDATETIME="25 Apr 2017 - 18:16" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="54" PHONENO="918861871977" RATE="155" REFUNDEXISTS="N" USAGEAMOUNT="294.5" USAGEKB="0" USAGEMB="0"/>
<record CALLDATETIME="28 Apr 2017 - 09:37" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="0" PHONENO="919444281907" RATE="155" REFUNDEXISTS="N" USAGEAMOUNT="155" USAGEKB="0" USAGEMB="0"/></multiplerecord></custominfo>
Sample data source
Jasper version 5.6 has some bug which doesn't allow band height decrease automatically but after updating to 6.3.1 issue seems fixed and band height changes dynamically.

JasperReport printing repeated values even when set not to

I am combining an sql column and using the group count to print out only one line for combined items. However I'm getting this result:
Here's my code: (sorry if it's messy)
<?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="TableReceipt" pageWidth="225" pageHeight="800" whenNoDataType="AllSectionsNoDetail" columnWidth="195" leftMargin="5" rightMargin="25" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" isIgnorePagination="true" uuid="516cb110-18eb-4a7a-865b-66c019f5be1a">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.9965000000000035"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<parameter name="ticketId" class="java.lang.Integer">
<defaultValueExpression><![CDATA[2]]></defaultValueExpression>
</parameter>
<parameter name="isSale" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<parameter name="endTicket" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT
t.TICKET_ITEM_ID,
TICKET_ITEM_DESC,
TICKET_ITEM_TOTAL,
ticket.TICKET_ID,
TICKET_CUSTOMER_NAME,
TICKET_CHECK_TOTAL,
TICKET_TOTAL_TAX,
TICKET_ITEM_NUMBER
FROM
ticket_item AS t,
ticket
WHERE
t.TICKET_ID = $P{ticketId}
AND
ticket.TICKET_ID = $P{ticketId}
AND
TICKET_ITEM_VOID = 0]]>
</queryString>
<field name="TICKET_ITEM_ID" class="java.lang.Integer">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_ITEM_DESC" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_ITEM_TOTAL" class="java.lang.Double">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_ID" class="java.lang.Integer">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_CUSTOMER_NAME" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_CHECK_TOTAL" class="java.lang.Double">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_TOTAL_TAX" class="java.lang.Double">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="TICKET_ITEM_NUMBER" class="java.lang.Integer">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<variable name="15per" class="java.lang.Double">
<variableExpression><![CDATA[($F{TICKET_CHECK_TOTAL}-$F{TICKET_TOTAL_TAX})*0.15]]></variableExpression>
</variable>
<variable name="18per" class="java.lang.Double">
<variableExpression><![CDATA[($F{TICKET_CHECK_TOTAL}-$F{TICKET_TOTAL_TAX})*0.18]]></variableExpression>
</variable>
<variable name="20per" class="java.lang.Double">
<variableExpression><![CDATA[($F{TICKET_CHECK_TOTAL}-$F{TICKET_TOTAL_TAX})*0.20]]></variableExpression>
</variable>
<variable name="count" class="java.lang.Integer" resetType="None">
<variableExpression><![CDATA[$V{item_name_COUNT}]]></variableExpression>
<initialValueExpression><![CDATA[$V{item_name_COUNT}]]></initialValueExpression>
</variable>
<group name="item_name">
<groupExpression><![CDATA[$F{TICKET_ITEM_NUMBER}]]></groupExpression>
</group>
<title>
<band height="20" splitType="Stretch">
<subreport>
<reportElement uuid="f2cebdf8-f1d6-413f-9c03-914be928988c" x="0" y="20" width="195" height="0"/>
<subreportParameter name="top">
<subreportParameterExpression><![CDATA[1]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/ticket_lines.jasper"]]></subreportExpression>
</subreport>
<staticText>
<reportElement uuid="ffbd8a47-40c3-4210-8301-913b3ef152e6" x="0" y="0" width="195" height="20">
<printWhenExpression><![CDATA[!$P{isSale}]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Calibri" size="12" isBold="true"/>
</textElement>
<text><![CDATA[NOT A SALE TICKET]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="36">
<subreport>
<reportElement uuid="a1231c58-cd4f-46d7-87ce-a277abb52bc6" x="0" y="0" width="195" height="36">
<printWhenExpression><![CDATA[$F{TICKET_CUSTOMER_NAME} == null]]></printWhenExpression>
</reportElement>
<subreportParameter name="ticketId">
<subreportParameterExpression><![CDATA[$P{ticketId}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/details.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="f47b2daf-b879-4fd6-9168-f1893a5a323f" x="0" y="0" width="195" height="36">
<printWhenExpression><![CDATA[$F{TICKET_CUSTOMER_NAME} != null]]></printWhenExpression>
</reportElement>
<subreportParameter name="ticketId">
<subreportParameterExpression><![CDATA[$P{ticketId}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/customerDetails.jasper"]]></subreportExpression>
</subreport>
</band>
</pageHeader>
<columnHeader>
<band height="11" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="11" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="5b3ae499-3805-43ed-8f73-5a07bb67d2be" isPrintRepeatedValues="false" x="20" y="0" width="140" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="item_name"/>
<textElement verticalAlignment="Middle">
<font fontName="Calibri" size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TICKET_ITEM_DESC}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="16aac7b5-9688-4a78-860a-073cfca5fb9e" isPrintRepeatedValues="false" x="160" y="0" width="35" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="item_name"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Calibri" size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TICKET_ITEM_TOTAL}]]></textFieldExpression>
</textField>
<subreport>
<reportElement uuid="95f2a214-786a-45f7-ad12-2fc2befb5351" positionType="Float" isPrintRepeatedValues="false" x="0" y="11" width="195" height="0" isRemoveLineWhenBlank="true"/>
<subreportParameter name="TICKET_ITEM_ID">
<subreportParameterExpression><![CDATA[$F{TICKET_ITEM_ID}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/modifiers.jasper"]]></subreportExpression>
</subreport>
<textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="item_name" isBlankWhenNull="true">
<reportElement uuid="0536d26c-7ce5-4cb6-a3ea-7a8f3303ac25" isPrintRepeatedValues="false" mode="Transparent" x="0" y="0" width="20" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="item_name"/>
<textElement verticalAlignment="Middle">
<font fontName="Calibri" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{item_name_COUNT}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
<band height="160">
<subreport runToBottom="false">
<reportElement uuid="7fc03f4a-fc6e-486f-8194-c7e6f770f5ff" positionType="Float" x="0" y="59" width="195" height="0" isPrintWhenDetailOverflows="true"/>
<subreportParameter name="top">
<subreportParameterExpression><![CDATA[0]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/ticket_lines.jasper"]]></subreportExpression>
</subreport>
<subreport runToBottom="false">
<reportElement uuid="3dffcb5c-fda5-483e-a8e6-d584d2343dc6" x="0" y="0" width="195" height="0" isPrintWhenDetailOverflows="true"/>
<subreportParameter name="ticketId">
<subreportParameterExpression><![CDATA[$P{ticketId}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/totals.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="64e108d9-e944-402d-b5a4-83c618f64521" positionType="Float" x="0" y="68" width="195" height="92" isRemoveLineWhenBlank="true"/>
<subreportParameter name="ticketId">
<subreportParameterExpression><![CDATA[$P{ticketId}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/deliveryDetails.jasper"]]></subreportExpression>
</subreport>
<subreport runToBottom="false">
<reportElement uuid="6757917e-b848-4d29-ad8b-7df6ef333561" positionType="Float" x="0" y="15" width="195" height="0" isPrintWhenDetailOverflows="true">
<printWhenExpression><![CDATA[$P{endTicket}]]></printWhenExpression>
</reportElement>
<subreportParameter name="ticketId">
<subreportParameterExpression><![CDATA[$P{ticketId}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreports/condensed_transactions.jasper"]]></subreportExpression>
</subreport>
<textField pattern="¤ #,##0.00">
<reportElement uuid="f309bce5-1d1b-475f-b6e0-91d254b20ae4" positionType="Float" x="95" y="15" width="55" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<textFieldExpression><![CDATA[$V{15per}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="67bd8b7a-122e-435f-abf5-e7a109c4f7b8" positionType="Float" x="61" y="41" width="34" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<text><![CDATA[20% -]]></text>
</staticText>
<staticText>
<reportElement uuid="69ee0f5f-378d-4fa0-b3f5-bd1dc337d71c" positionType="Float" x="61" y="28" width="34" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<text><![CDATA[18% -]]></text>
</staticText>
<textField pattern="¤ #,##0.00">
<reportElement uuid="1747abc9-812c-4157-a717-fc6774fb92d7" positionType="Float" x="95" y="28" width="55" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<textFieldExpression><![CDATA[$V{18per}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="ec57b3a8-4b29-40e5-b05c-1b90cab7558f" positionType="Float" x="95" y="41" width="55" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<textFieldExpression><![CDATA[$V{20per}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="8130693f-ca43-4a22-9b05-6f89707dc71f" positionType="Float" x="61" y="15" width="34" height="13" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[!$P{endTicket}]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Calibri"/>
</textElement>
<text><![CDATA[15% -]]></text>
</staticText>
</band>
</summary>
</jasperReport>
What we're looking at is the $V{item_name_COUNT} field. Even with Print Repeated Values set to false, I'm still getting them. Evaluation Time is set to Group because if it's set to anything else, the count will increment and will not give me the correct group count. Any idea how to fix this? I NEED the count.
Seems like a simple GROUP BY and COUNT fixed the issue.
Here's the SQL I used:
SELECT
t.TICKET_ITEM_ID,
TICKET_ITEM_DESC,
TICKET_ITEM_TOTAL,
ticket.TICKET_ID,
TICKET_CUSTOMER_NAME,
TICKET_CHECK_TOTAL,
TICKET_TOTAL_TAX,
TICKET_ITEM_NUMBER,
COUNT(TICKET_ITEM_NUMBER) AS COUNT
FROM
ticket_item AS t,
ticket
WHERE
t.TICKET_ID = $P{ticketId}
AND
ticket.TICKET_ID = $P{ticketId}
AND
TICKET_ITEM_VOID = 0
GROUP BY
TICKET_ITEM_NUMBER
Everything else stayed the same.

Image is not rendering in pdf format

I created a report in iReport 5.1.0 which is running properly. There is a image in report, which is displaying properly on JasperReports Server. But when i export that report in PDF format then its take lot of time to generate pdf. When i remove that image then report is properly export to pdf format. But when image is used then it is not exporting in pdf format it take lots of time.
The image expression is : "http://14.139.222.82:8080//"+$P{imagePath}
The value of parameter imagePath is /isi/onlineAdmission/studentImage/579.png
The jrxml code is:
<?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="Admit_Card" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="cd1f65f7-0b93-435f-b13e-f2fa9f8d8ae9">
<property name="ireport.jasperserver.reportUnit" value="/reports/samples/11"/>
<property name="ireport.jasperserver.url" value="http://14.139.222.82:9090/jasperserver/services/repository"/>
<subDataset name="instructions" uuid="f92d8a7c-2ea1-445e-841e-1265b14fcf4d">
<parameter name="online_add_sess_map_pk" class="java.lang.Long" isForPrompting="false">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT * from online_admission_exam_admitcard_instruction where online_admission_session_map_pk=$P{online_add_sess_map_pk}]]>
</queryString>
<field name="online_admission_session_map_pk" class="java.math.BigInteger">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="instructions" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
</subDataset>
<parameter name="user_registration_pk" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="online_add_sess_map_pk" class="java.lang.Long" isForPrompting="false"/>
<parameter name="imagePath" class="java.lang.String"/>
<parameter name="signaturePath" class="java.lang.String"/>
<queryString>
]>
</queryString>
<field name="pk" class="java.lang.Long">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="address" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="online_admission_exam_center_pk" class="java.lang.Long">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="cityName" class="java.lang.String"/>
<field name="city_code" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="state_name" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="exam_name" class="java.lang.String"/>
<field name="schedule_date" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="shift_name_time" class="java.lang.String"/>
<field name="email_id" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="email_id_alt" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<group name="User_registration_pk" isStartNewPage="true">
<groupExpression><![CDATA[$P{user_registration_pk}]]></groupExpression>
</group>
<group name="pk" isStartNewPage="true">
<groupExpression><![CDATA[$F{registration_no}]]></groupExpression>
<groupHeader>
<band/>
</groupHeader>
</group>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="82" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement uuid="d9be73ee-0d2b-472e-88b0-b72f36a01b8f" x="0" y="62" width="555" height="20"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["ADMIT CARD FOR ADMISSION TEST"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="8996ef53-ae5c-4fe8-8a6f-8ddac24fe47f" mode="Opaque" x="0" y="42" width="555" height="20" forecolor="#000000" backcolor="#999999"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Email : isiadmission#isical.ac.in"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="41c09054-2de0-41c5-8baf-9ebdd6621feb" x="361" y="0" width="194" height="42"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["203, Barrackpore Trunk Road,<br>Kolkata 700108, INDIA"]]></textFieldExpression>
</textField>
</band>
<band height="411">
<textField>
<reportElement uuid="acf9a427-8ebd-476f-8d42-d66de547b6b4" positionType="Float" x="0" y="1" width="212" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Name and Address of the Candidate"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="4502b4b0-56d7-4e4a-96c8-47293770ecf3" positionType="Float" x="212" y="1" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Registration No."]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="7ba31cab-2dd4-48b9-a61b-6d50b3b2fa8f" positionType="Float" x="212" y="136" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{gender}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="a3e1e483-86a0-4d39-b9b1-06c1e550b2ed" positionType="Float" x="212" y="16" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{registration_no}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="90df81d1-a8ef-4bf7-b709-73af0458997e" positionType="Float" x="212" y="31" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Programme Applied"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="65e5c8e8-5cdb-485f-a80a-d7399323ed94" positionType="Float" x="212" y="61" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Category"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="3e7f29ca-d82d-4811-95a6-ed3a53e92415" positionType="Float" x="212" y="46" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{programme_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6e01480b-8e85-4b94-be9c-c8ef565a8ba6" positionType="Float" x="212" y="91" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["PH"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="767ae279-c9c2-4a69-9ca4-6686d9d41fdc" positionType="Float" x="212" y="76" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{seat_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="823eae73-e4ca-4515-9d27-6c532f21992b" positionType="Float" x="212" y="106" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{physical_disable}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="da4b62a6-b9ed-4cc0-9f47-9f801f087205" positionType="Float" x="212" y="121" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Sex"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="99a61280-b1f8-4fa4-aa3f-8847cb899fa0" positionType="Float" x="0" y="16" width="212" height="30"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{studentName}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a0fb17bf-8af4-4584-9440-1bf183486688" positionType="Float" x="0" y="151" width="86" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[" TEST DATE"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c5eb4ccd-fb77-40ad-968c-fd14ed80f888" positionType="Float" x="0" y="166" width="86" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["Reporting Time"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7da99bb4-ed79-4582-b1bd-092a8a9f1899" positionType="Float" x="0" y="181" width="86" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["City"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="02f8e046-209f-4df4-a08b-572f79548ae8" positionType="Float" x="0" y="196" width="86" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["City Code"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2e3e3840-4d31-4600-ad6b-139976ae1313" positionType="Float" x="212" y="151" width="194" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["TEST VENUE"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="a34c1c2e-3bd8-4938-bcf5-ca3d273dff04" positionType="Float" x="212" y="166" width="194" height="45"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{address}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="778caed1-7e09-4269-bd93-83424087c13e" positionType="Float" mode="Opaque" x="0" y="211" width="555" height="20" forecolor="#000000" backcolor="#999999"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d0901557-729d-49e6-8a24-ef3b4feac126" positionType="Float" x="0" y="231" width="153" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[" TEST SHIFT"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="664953e5-011c-4504-8182-24aff5d97b85" positionType="Float" x="153" y="231" width="154" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[" TEST CODE"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="48036a48-9a2b-4dbe-9f1d-7915ea82d13a" positionType="Float" x="307" y="231" width="248" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA["SIGNATURE OF STUDENT"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="07909c30-d773-40c4-a5b6-0cd52b2119bf" positionType="Float" x="307" y="246" width="248" height="30"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="1ebd8879-f1f2-424c-8d0c-83ef8d6152f5" positionType="Float" x="423" y="321" width="132" height="14"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["(Dean of studies)"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="e931a4f5-3f4c-4df6-8cbd-40517d2698c5" positionType="Float" x="86" y="181" width="126" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{cityName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="b855053a-00b0-41da-a571-c7bb77a57326" positionType="Float" x="86" y="196" width="126" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{cpin_code}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="9ecb22ad-c3ae-4489-b15a-9b804c228b55" positionType="Float" x="0" y="46" width="212" height="105"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{caddress1}+"<BR>"+$F{ccity_name}+"<BR>"+$F{cstate_name}+"<BR>"+$F{cpin_code}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="78bf4e67-8d10-4520-9414-16a6002acf7a" positionType="Float" x="86" y="166" width="126" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{reporting_time}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="bf671cd9-258c-484c-8035-c07986890fe5" positionType="Float" x="86" y="151" width="126" height="15"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{schedule_date}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="ba69b52c-8b35-4a40-8cdb-0b1b98d8f839" positionType="Float" x="0" y="246" width="153" height="30"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement markup="html"/>
<textFieldExpression><![CDATA[$F{shift_name_time}.replace(",","<br>")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="92711d97-2950-42d1-b941-788623cb3a6f" positionType="Float" x="153" y="246" width="154" height="30"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement markup="html"/>
<textFieldExpression><![CDATA[$F{exam_name}.replace( ",", "<br>" )]]></textFieldExpression>
</textField>
<frame>
<reportElement uuid="c6d87f83-3e3e-4f47-9d69-2910409b7381" positionType="Float" x="406" y="1" width="149" height="210"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<image isUsingCache="true" isLazy="true" onErrorType="Icon" evaluationTime="Auto">
<reportElement uuid="86f1caad-1d22-4300-9c41-115d021d480d" x="17" y="14" width="100" height="121"/>
<imageExpression><![CDATA["http://14.139.222.82:8080//"+$P{imagePath}]]></imageExpression>
</image>
</frame>
<textField isStretchWithOverflow="true">
<reportElement uuid="83988889-dfbd-456d-a4de-d517ef3e27cf" positionType="Float" mode="Opaque" x="0" y="341" width="555" height="20" forecolor="#FFFFFF" backcolor="#999999"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["READ INSTRUCTIONS CAREFULLY"]]></textFieldExpression>
</textField>
<frame>
<reportElement uuid="6e128ef2-40dd-4c24-a5a9-586811a8beed" x="0" y="276" width="555" height="65"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
</frame>
<componentElement>
<reportElement uuid="ec5c4aab-6e98-4c88-9245-bcae9e946a30" positionType="Float" x="0" y="361" width="555" height="50"/>
<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="instructions" uuid="dcf3c653-9b0f-474e-84e9-501c64bccf24">
<datasetParameter name="online_add_sess_map_pk">
<datasetParameterExpression><![CDATA[$P{online_add_sess_map_pk}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:listContents height="50" width="555">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="7eaf6ecf-2ab6-40af-8f02-089a738e7b14" positionType="Float" x="0" y="0" width="555" height="50"/>
<box leftPadding="5">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement markup="html"/>
<textFieldExpression><![CDATA[$F{instructions}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
</jasperReport>
The output on JR Server is:
I think problem is in the path, it should be
The image expression is : "http ://14.139.222 .82:8080 //"+$P{imagePath}
The value of parameter imagePath is isi/onlineAdmission/studentImage/579.png
Do check and let me know
Thanks

Background on sub-report does not display

I'm using iReport 4.5.1 (unfortunately using a later version is not an option) and have a report that has multiple sub-reports associated. In the Background band of the main report, I have placed text to be used as a watermark - this displays fine on each report page. In one sub-report I want to display an additional watermark, so have added an additional text field element in the background band of this report.
When I run the report as a whole, the watermark text for the sub-report does not display, yet when I run the sub-report separately, its watermark text displays fine. Any ideas why this might be happening?
You can check this sample.
The master report design (in iReport):
I've placed 4 staticText on Background band.
The jrxml file for master report is:
<?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="mainrep_watermark" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ffeb1237-be4e-4cca-8a63-223aa5d8f3e6">
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["/somepath"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT * FROM product ORDER BY id]]>
</queryString>
<field name="ID" class="java.lang.Integer"/>
<field name="NAME" class="java.lang.String"/>
<field name="COST" class="java.math.BigDecimal"/>
<group name="idgroup">
<groupExpression><![CDATA[$F{ID}]]></groupExpression>
<groupFooter>
<band height="28">
<subreport>
<reportElement uuid="710fe82b-fd08-4db3-bba1-929870f83fa4" x="100" y="0" width="200" height="27"/>
<subreportParameter name="productId">
<subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subreport_watermark.jasper"]]></subreportExpression>
</subreport>
</band>
</groupFooter>
</group>
<background>
<band height="802" splitType="Stretch">
<staticText>
<reportElement uuid="0e7c3a54-8876-4523-9bad-2b582b1defb9" x="51" y="15" width="468" height="148" forecolor="#0033FF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="48"/>
</textElement>
<text><![CDATA[Master watermark 1]]></text>
</staticText>
<staticText>
<reportElement uuid="584b9b65-c040-43a0-96ce-6fa14e9db597" x="51" y="174" width="468" height="148" forecolor="#0033FF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="48"/>
</textElement>
<text><![CDATA[Master watermark 2]]></text>
</staticText>
<staticText>
<reportElement uuid="4f4f55b5-cbd4-4b10-bcf4-1e81d16bb537" x="51" y="344" width="468" height="148" forecolor="#0033FF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="48"/>
</textElement>
<text><![CDATA[Master watermark 3]]></text>
</staticText>
<staticText>
<reportElement uuid="10b1534f-d880-4ca3-9a2f-847d68826011" x="51" y="524" width="468" height="148" forecolor="#0033FF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="48"/>
</textElement>
<text><![CDATA[Master watermark 4]]></text>
</staticText>
</band>
</background>
<columnHeader>
<band height="20" splitType="Stretch">
<staticText>
<reportElement uuid="d337add8-2a0d-4a9e-ad3c-3dfb322b715a" mode="Opaque" x="0" y="0" width="100" height="20" backcolor="#CCCCCC"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true" isItalic="true"/>
</textElement>
<text><![CDATA[Id]]></text>
</staticText>
<staticText>
<reportElement uuid="97ff3089-7082-4f30-850e-e59836ff48a2" mode="Opaque" x="100" y="0" width="100" height="20" backcolor="#CCCCCC"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true" isItalic="true"/>
</textElement>
<text><![CDATA[Name]]></text>
</staticText>
<staticText>
<reportElement uuid="ec4bc628-f6bb-40be-9e46-fd49327071f2" mode="Opaque" x="200" y="0" width="100" height="20" backcolor="#CCCCCC"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true" isItalic="true"/>
</textElement>
<text><![CDATA[Cost]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement uuid="2b43cdac-3453-499e-a6e0-b33eef8bf3f9" x="0" y="0" width="100" height="20"/>
<box leftPadding="10">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="75ba99d4-646e-470c-b68b-fa111b702ac7" x="100" y="0" width="100" height="20"/>
<box leftPadding="10">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{NAME}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="451db60d-5255-41fe-b5fe-8e523118fab3" x="200" y="0" width="100" height="20"/>
<box leftPadding="10">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{COST}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
And the subreport's design is (in iReport):
I've placed one staticText on Background band and rotate the text on 90 degrees.
The jrxml file of subreport is:
<?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="subreport_watermark" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="cf5d8eca-6c3a-4e1f-a6c9-107436e0ac48">
<parameter name="productId" class="java.lang.String"/>
<queryString language="SQL">
<![CDATA[SELECT TOP 10 QUANTITY, PRICE FROM positions WHERE productid=$P{productId}]]>
</queryString>
<field name="QUANTITY" class="java.lang.Integer"/>
<field name="PRICE" class="java.math.BigDecimal"/>
<background>
<band height="95" splitType="Stretch">
<staticText>
<reportElement uuid="f09a53bb-3b62-4e97-8e6b-2c592f469c3d" positionType="Float" stretchType="RelativeToBandHeight" x="78" y="0" width="100" height="95" forecolor="#FF3333"/>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="Left">
<font size="20"/>
</textElement>
<text><![CDATA[Subreport watermark]]></text>
</staticText>
</band>
</background>
<detail>
<band height="15" splitType="Stretch">
<textField>
<reportElement uuid="135d5748-db78-4272-a1c8-a94f5ce5549e" x="43" y="0" width="60" height="15"/>
<box leftPadding="10">
<topPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<leftPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<bottomPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<rightPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
</box>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["Quantity: " + $F{QUANTITY}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8736b7b8-b7cd-4fd5-8494-9519cb55317c" x="103" y="0" width="60" height="15"/>
<box leftPadding="10">
<topPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<leftPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<bottomPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
<rightPen lineWidth="0.25" lineStyle="Dashed" lineColor="#3300FF"/>
</box>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["Price: " + $F{PRICE}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
The result will be (generated pdf in Adobe Reader):
Thanks Alex K. I found that my issue was actually due to having a page header defined on my main report. For some reason that seems to override the background band on sub-reports displaying. I have no idea why and would be very interested to know if anyone is aware of the reason. I was able to work around my issue by removing the page header from the main report. (user2756852/Deb)