Row transferred to next page get Calculated in the current page (Or previous page from where it was prevented to be printed) - jasper-reports

How can I understand that a special row in the Detail section of a report (with Slpit Type = prevent) has transferred to the next page to prevent split?
I need to do this because I have a report with a numeric column(suppose its name is quantity) per row which I want to show summation of that column for all records in every page, the desired value will calculate from summation of quantity columns in current page and all previous pages(suppose its name is qSum). If i allow splitting for Detail band rows, there is no problem, but when I prevent splitting, the quantity column value of splitted row will add to calculated summation (qSum) of current page, but the row itself will shown in the next page!
any idea ?
In order words how can I force the summation to be only for the row appearing on that page. (excluding the transferred row)
My column summation is the column footer.
Below is partial part of my report:
<?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="generalLedger01" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="806" leftMargin="18" rightMargin="18" topMargin="4" bottomMargin="14" isFloatColumnFooter="true">
<parameter name="zero" class="java.math.BigDecimal" isForPrompting="false">
<property name="""" value="0"/>
<defaultValueExpression><![CDATA[new BigDecimal(0)]]></defaultValueExpression>
</parameter>
<parameter name="firstPageNumber" class="java.lang.Integer">
<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
</parameter>
<parameter name="budgetAllocation" class="java.math.BigDecimal">
<property name="""" value="0"/>
<defaultValueExpression><![CDATA[new BigDecimal(0)]]></defaultValueExpression>
</parameter>
<parameter name="lastPageNumber" class="java.lang.Integer">
<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
</parameter>
<parameter name="paramYear" class="java.lang.Long">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="paramAccCode" class="java.math.BigDecimal">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT
voucher.`rec_no` AS voucher_rec_no,
voucher.`acc_code` AS voucher_acc_code,
voucher.`acc_name` AS voucher_acc_name,
voucher.`pers_code` AS voucher_pers_code,
voucher.`mult_single` AS voucher_mult_single,
voucher.`debit_credit` AS voucher_debit_credit,
voucher.`corr_ac_code` AS voucher_corr_ac_code,
voucher.`voucher_no` AS voucher_voucher_no,
voucher.`conv_rate` AS voucher_conv_rate,
voucher.`entry_amount` AS voucher_entry_amount,
voucher.`dollar_taka` AS voucher_dollar_taka,
voucher.`details_1` AS voucher_details_1,
voucher.`details_2` AS voucher_details_2,
voucher.`details_3` AS voucher_details_3,
voucher.`gj_1` AS voucher_gj_1,
voucher.`gj_2` AS voucher_gj_2,
voucher.`gj_3` AS voucher_gj_3,
voucher.`amount` AS voucher_amount,
voucher.`voucher_tag` AS voucher_voucher_tag,
voucher.`voucher_date` AS voucher_voucher_date,
voucher.`voucher_day` AS voucher_voucher_day,
voucher.`voucher_month` AS voucher_voucher_month,
voucher.`voucher_year` AS voucher_voucher_year,
voucher.`voucher_quater` AS voucher_voucher_quater,
code.code_name as codeName,
subcode.sub_code_name as subCodeName
FROM
`voucher` voucher, `code` code,`sub_code` subcode
where ( ((code.code=$P{paramAccCode})or(subcode.sub_code=$P{paramAccCode}))
and
voucher.`voucher_year`=$P{paramYear}
and
( voucher.`acc_code`=$P{paramAccCode}
or
voucher.`corr_ac_code`=$P{paramAccCode}
)
)
GROUP BY
voucher.`voucher_quater`,
voucher.`voucher_month` ,
voucher.`voucher_day` ,
voucher.`rec_no`;]]>
</queryString>
<field name="voucher_rec_no" class="java.math.BigInteger"/>
<field name="voucher_acc_code" class="java.math.BigDecimal"/>
<field name="voucher_acc_name" class="java.lang.String"/>
<field name="voucher_pers_code" class="java.math.BigDecimal"/>
<field name="voucher_mult_single" class="java.lang.String"/>
<field name="voucher_debit_credit" class="java.lang.String"/>
<field name="voucher_corr_ac_code" class="java.math.BigDecimal"/>
<field name="voucher_voucher_no" class="java.lang.String"/>
<field name="voucher_conv_rate" class="java.math.BigDecimal"/>
<field name="voucher_entry_amount" class="java.math.BigDecimal"/>
<field name="voucher_dollar_taka" class="java.lang.String"/>
<field name="voucher_details_1" class="java.lang.String"/>
<field name="voucher_details_2" class="java.lang.String"/>
<field name="voucher_details_3" class="java.lang.String"/>
<field name="voucher_gj_1" class="java.lang.String"/>
<field name="voucher_gj_2" class="java.lang.String"/>
<field name="voucher_gj_3" class="java.lang.String"/>
<field name="voucher_amount" class="java.math.BigDecimal"/>
<field name="voucher_voucher_tag" class="java.lang.String"/>
<field name="voucher_voucher_date" class="java.lang.String"/>
<field name="voucher_voucher_day" class="java.lang.Long"/>
<field name="voucher_voucher_month" class="java.lang.Long"/>
<field name="voucher_voucher_year" class="java.lang.Long"/>
<field name="voucher_voucher_quater" class="java.lang.Long"/>
<field name="codeName" class="java.lang.String"/>
<field name="subCodeName" class="java.lang.String"/>
<variable name="balance" class="java.math.BigDecimal">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?($V{balance}.add($F{voucher_amount})):($V{balance}.subtract($F{voucher_amount})))]]></variableExpression>
<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
</variable>
<variable name="balance_tk" class="java.math.BigDecimal">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?($V{balance_tk}.add($F{voucher_entry_amount})):($V{balance_tk}.subtract($F{voucher_entry_amount})))]]></variableExpression>
<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
</variable>
<variable name="balance_credit" class="java.math.BigDecimal" resetType="Column" calculation="Sum">
<variableExpression><![CDATA[$F{voucher_amount}]]></variableExpression>
</variable>
<variable name="balance_debit" class="java.math.BigDecimal" resetType="Column" calculation="Sum">
<variableExpression><![CDATA[$F{voucher_amount}]]></variableExpression>
</variable>
<variable name="monthTotalDebit" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?$F{voucher_amount}:$P{zero})]]></variableExpression>
<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
</variable>
<variable name="pageTotalCredit" class="java.math.BigDecimal" resetType="Page" calculation="Sum">
<variableExpression><![CDATA[(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_amount}:$P{zero})]]></variableExpression>
</variable>
<variable name="pageTotalCredit_tk" class="java.math.BigDecimal" resetType="Page" calculation="Sum">
<variableExpression><![CDATA[(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_entry_amount}:(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_entry_amount}:$P{zero}))]]></variableExpression>
</variable>
<variable name="monthTotalCredit" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_amount}:$P{zero})]]></variableExpression>
</variable>
<variable name="pageTotalDebit_tk" class="java.math.BigDecimal" resetType="Page" calculation="Sum">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?$F{voucher_entry_amount}:$P{zero})]]></variableExpression>
</variable>
<variable name="pageTotalDebit" class="java.math.BigDecimal" resetType="Page" calculation="Sum">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?$F{voucher_amount}:$P{zero})]]></variableExpression>
</variable>
<variable name="monthTotalCredit_tk" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_entry_amount}:(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_entry_amount}:$P{zero}))]]></variableExpression>
</variable>
<variable name="monthTotalDebit_tk" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?$F{voucher_entry_amount}:$P{zero})]]></variableExpression>
<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
</variable>
<group name="voucher_voucher_quater">
<groupExpression><![CDATA[$F{voucher_voucher_quater}]]></groupExpression>
<groupFooter>
<band height="16">
<textField>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="41" y="0" width="56" height="16"/>
<box>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="96" y="0" width="46" height="16"/>
<box leftPadding="2"/>
<textElement>
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="142" y="0" width="198" height="16"/>
<box leftPadding="2" rightPadding="4">
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["SUB TOTAL:"]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="340" y="0" width="74" height="16"/>
<box rightPadding="2"/>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{monthTotalDebit_tk}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="414" y="0" width="74" height="16"/>
<box rightPadding="2">
<leftPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{monthTotalCredit_tk}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="488" y="0" width="74" height="16"/>
<box leftPadding="0" rightPadding="2">
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{balance_tk}]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
<group name="voucher_voucher_month">
<groupExpression><![CDATA[$F{voucher_voucher_month}]]></groupExpression>
</group>
<group name="voucher_voucher_day">
<groupExpression><![CDATA[$F{voucher_voucher_day}]]></groupExpression>
</group>
<group name="voucher_voucher_tag">
<groupExpression><![CDATA[$F{voucher_voucher_tag}]]></groupExpression>
</group>
<columnHeader>
<band height="119" splitType="Stretch">
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="414" y="104" width="74" height="15"/>
<box topPadding="2" rightPadding="2">
<leftPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[($V{PAGE_NUMBER}.intValue()==1?"" :$V{monthTotalCredit_tk})]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="142" y="105" width="198" height="14"/>
<box topPadding="2" leftPadding="2">
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[($V{PAGE_NUMBER}.intValue()==1?"" :"B/F")]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="97" y="105" width="46" height="14"/>
<box leftPadding="2"/>
<textElement>
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="340" y="105" width="74" height="14"/>
<box topPadding="2" rightPadding="2"/>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[(($V{PAGE_NUMBER}.intValue()==1)?"":$V{monthTotalDebit_tk} )]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="41" y="104" width="56" height="15"/>
<box>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="488" y="105" width="74" height="14"/>
<box topPadding="2" rightPadding="2">
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[(($V{PAGE_NUMBER}.intValue()==1)?"":$V{balance_tk} )]]></textFieldExpression>
</textField>
<textField>
<reportElement x="149" y="57" width="43" height="11"/>
<textElement>
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{paramAccCode}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="340" y="90" width="74" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[DEBIT]]></text>
</staticText>
<staticText>
<reportElement x="414" y="90" width="74" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[CREDIT]]></text>
</staticText>
<staticText>
<reportElement x="488" y="90" width="74" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[BALANCE]]></text>
</staticText>
<staticText>
<reportElement x="97" y="90" width="45" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[Vr .No.]]></text>
</staticText>
<staticText>
<reportElement x="142" y="90" width="198" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[CHEQUE NO./EXPLANATION]]></text>
</staticText>
<textField>
<reportElement x="719" y="0" width="66" height="20"/>
<textElement>
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA["Page : "+($V{PAGE_NUMBER}+$P{firstPageNumber})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="334" y="35" width="273" height="14"/>
<textElement>
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA["FOR THE FISCAL YEAR "+$F{voucher_voucher_year}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement x="143" y="79" width="30" height="10"/>
<textElement>
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[" US$. "]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="41" y="90" width="55" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[DATE]]></text>
</staticText>
<staticText>
<reportElement x="344" y="22" width="108" height="13"/>
<textElement textAlignment="Center">
<font fontName="Courier New" size="9" isBold="false"/>
</textElement>
<text><![CDATA[GENERAL LEDGER]]></text>
</staticText>
<staticText>
<reportElement x="340" y="75" width="222" height="15"/>
<box topPadding="3">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8"/>
</textElement>
<text><![CDATA[IN BANGLADESH TAKA]]></text>
</staticText>
<textField>
<reportElement x="149" y="68" width="191" height="11"/>
<textElement>
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[($F{subCodeName}.isEmpty()?$F{codeName}:$F{subCodeName})]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement x="174" y="79" width="166" height="10"/>
<textElement>
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{budgetAllocation}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="39" y="57" width="110" height="11"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["ACCOUNT CODE :"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="39" y="68" width="110" height="11"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["ACCOUNT NAME :"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="39" y="79" width="110" height="11"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["BUDGET ALLOCATION :"]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="14" splitType="Prevent">
<textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="414" y="0" width="74" height="14" isPrintWhenDetailOverflows="true"/>
<box rightPadding="2">
<leftPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[(($F{voucher_debit_credit}.equals("B")||(($F{voucher_corr_ac_code}).equals($P{paramAccCode})))?$F{voucher_entry_amount}:"")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="41" y="0" width="56" height="14" isPrintWhenDetailOverflows="true"/>
<box>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{voucher_voucher_date}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="488" y="0" width="74" height="14" isPrintWhenDetailOverflows="true"/>
<box leftPadding="0" rightPadding="2">
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{balance_tk}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="142" y="0" width="198" height="14" isPrintWhenDetailOverflows="true"/>
<box leftPadding="3">
<leftPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement>
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{voucher_details_1}+$F{voucher_details_2}+$F{voucher_details_3}+"\n"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="340" y="0" width="74" height="14" isPrintWhenDetailOverflows="true"/>
<box rightPadding="2"/>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[((($F{voucher_debit_credit}.equals("A"))&&(!(($F{voucher_corr_ac_code}).equals($P{paramAccCode}))))?$F{voucher_entry_amount}:"")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="804" y="0" width="1" height="14" isPrintWhenDetailOverflows="true"/>
<box rightPadding="2">
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="9"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="97" y="0" width="46" height="14" isPrintWhenDetailOverflows="true"/>
<box leftPadding="3"/>
<textElement>
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{voucher_voucher_no}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="14" splitType="Stretch">
<textField pattern="#,##0.00">
<reportElement x="488" y="0" width="74" height="13"/>
<box topPadding="2" rightPadding="2">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{balance_tk}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement x="414" y="0" width="74" height="13"/>
<box topPadding="2" rightPadding="2">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="0.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="0.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{monthTotalCredit_tk}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement x="340" y="0" width="74" height="13"/>
<box topPadding="2" rightPadding="2">
<topPen lineWidth="2.0" lineStyle="Double"/>
<leftPen lineWidth="2.0" lineStyle="Double"/>
<bottomPen lineWidth="2.0" lineStyle="Double"/>
<rightPen lineWidth="1.0" lineStyle="Solid"/>
</box>
<textElement textAlignment="Right">
<font fontName="Courier New" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{monthTotalDebit_tk}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="42" y="0" width="298" height="13"/>
<box topPadding="2">
<topPen lineWidth="2.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center">
<font fontName="Courier New" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[(($V{PAGE_NUMBER}+$P{firstPageNumber})==$P{lastPageNumber})?"GRAND TOTAL":"TOTAL C/F"]]></textFieldExpression>
</textField>
</band>
</columnFooter>
<lastPageFooter>
<band/>
</lastPageFooter>
</jasperReport>

Related

How can I correct this Jasper so that the text field stretches its height to show all 500 characters of a string

I've already set strecth type to "tallest object" but didn't work. The field is "objeto". The only field that is going to have a lot of characters is f{objeto}, it will have up to 500 characters.
<?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="estimativa_processo" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="entidade" class="java.lang.String"/>
<parameter name="estado" class="java.lang.String"/>
<parameter name="logo" class="java.lang.Object"/>
<parameter name="setor" class="java.lang.String"/>
<parameter name="titulo" class="java.lang.String"/>
<parameter name="inventario" class="java.lang.String"/>
<field name="numeroRpl" class="java.lang.String"/>
<field name="secretaria" class="java.lang.String"/>
<field name="tipo_requisicao" class="java.lang.String"/>
<field name="objeto" class="java.lang.String"/>
<field name="justificativa" class="java.lang.String"/>
<field name="field1" class="java.lang.String"/>
<field name="formato_contratacao" class="java.lang.String"/>
<field name="local_entrega" class="java.lang.String"/>
<field name="requerente" class="java.lang.String"/>
<field name="observacao" class="java.lang.String"/>
<field name="dt_abertura" class="java.lang.String"/>
<field name="responsavel" class="java.lang.String"/>
<field name="lbl_formato" class="java.lang.String"/>
<field name="estimativa_consumo" class="java.lang.String"/>
<field name="media_processo" class="java.lang.Double"/>
<field name="nome_fornecedor" class="java.lang.String"/>
<field name="ddd_fone" class="java.lang.String"/>
<field name="fone" class="java.lang.String"/>
<field name="cnpj_cpf" class="java.lang.String"/>
<field name="data_atual" class="java.lang.String"/>
<group name="Requisicao">
<groupExpression><![CDATA[$F{numeroRpl}]]></groupExpression>
<groupHeader>
<band height="372">
<image hAlign="Center">
<reportElement key="image-1" x="147" y="2" width="256" height="56"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<imageExpression class="java.awt.Image"><![CDATA[$P{logo}]]></imageExpression>
</image>
<textField isBlankWhenNull="false">
<reportElement key="textField-140" x="1" y="69" width="553" height="28"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center">
<font size="16" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{entidade}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="-1" y="117" width="556" height="21"/>
<textElement textAlignment="Center">
<font size="16" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{titulo}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement key="textField-139" x="1" y="98" width="553" height="19"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{estado}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="6" y="288" width="127" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Estimativa de Consumo:]]></text>
</staticText>
<line>
<reportElement x="1" y="157" width="554" height="1"/>
</line>
<staticText>
<reportElement x="7" y="186" width="103" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Secretaria: ]]></text>
</staticText>
<staticText>
<reportElement x="6" y="162" width="42" height="18"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[RPL:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="7" y="252" width="539" height="32"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{objeto}]]></textFieldExpression>
</textField>
<line>
<reportElement x="51" y="157" width="1" height="27"/>
</line>
<staticText>
<reportElement x="7" y="231" width="103" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Objeto: ]]></text>
</staticText>
<line>
<reportElement x="1" y="184" width="553" height="1"/>
</line>
<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
<reportElement x="133" y="289" width="127" height="17"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{estimativa_consumo}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="56" y="162" width="133" height="18"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{numeroRpl}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="7" y="208" width="539" height="18"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{secretaria}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="6" y="310" width="127" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Média do Processo:]]></text>
</staticText>
<staticText>
<reportElement x="7" y="333" width="126" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Fornecedores Cotados:]]></text>
</staticText>
<staticText>
<reportElement x="7" y="352" width="103" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Nome]]></text>
</staticText>
<staticText>
<reportElement x="232" y="352" width="103" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[CNPJ/CPF]]></text>
</staticText>
<staticText>
<reportElement x="384" y="352" width="103" height="18"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Telefone]]></text>
</staticText>
<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="false">
<reportElement x="133" y="310" width="127" height="17"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.Double"><![CDATA[$F{media_processo}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="1" width="554" height="1"/>
</line>
<line>
<reportElement x="0" y="2" width="1" height="369"/>
</line>
<line>
<reportElement x="555" y="2" width="1" height="370"/>
</line>
<line>
<reportElement x="0" y="371" width="555" height="1"/>
</line>
</band>
</groupHeader>
<groupFooter>
<band height="130">
<textField>
<reportElement x="147" y="85" width="288" height="18"/>
<textElement textAlignment="Center"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{responsavel}]]></textFieldExpression>
</textField>
<line>
<reportElement x="169" y="83" width="248" height="1"/>
</line>
<textField pattern="dd/MM/yyyy">
<reportElement x="169" y="20" width="248" height="19"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{data_atual}]]></textFieldExpression>
</textField>
<line>
<reportElement x="555" y="0" width="1" height="130"/>
</line>
<line>
<reportElement x="0" y="0" width="1" height="130"/>
</line>
<line>
<reportElement x="1" y="129" width="554" height="1"/>
</line>
</band>
</groupFooter>
</group>
<group name="Fornecedor">
<groupExpression><![CDATA[$F{nome_fornecedor}]]></groupExpression>
<groupHeader>
<band height="22">
<line>
<reportElement x="555" y="0" width="1" height="22"/>
</line>
<textField>
<reportElement x="385" y="2" width="161" height="17"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA["(" + $F{ddd_fone} + ") " + $F{fone}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="233" y="2" width="128" height="17"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{cnpj_cpf}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="7" y="2" width="205" height="17"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{nome_fornecedor}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="0" width="1" height="22"/>
</line>
</band>
</groupHeader>
</group>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
Just add float position for everything you can and set the "lines" to stretch with band.

How can I get the first record of the table by using the same data-source for the main report and table in Jasper reports?

According to my design requirement, I am trying to create a simple Jasper report( using Jasper-soft Studio in 6.12 version) with Table in which the main report and table should be populated by java code using JRResultSetDataSource object with same query execution or data-source and also calculating the record count in page header, of the number of rows fetched in the table from the database.
But the problem is that- Either only table is getting  populated through the data Source or only main report is getting populated or while providing same data-source to both main report and table then the first record of the table is missing because the record pointer in the data source is incremented as the data-source is passed from main report to table. Nor am I able to clone the data source to provide a copy of the data-source to the table as it is not supported for JRResultSetDataSource.
I want to use the same data-source to populate the table and to populate text fields present in the main report.
Java code-
Connection con;
 Statement stmt;
 ResultSet rs;
 try {
      Class.forName("org.postgresql.Driver");
      con=DriverManager.getConnection("jdbc:postgresql://localhost:5432/jasperexamples", "postgres", "password");
       stmt=con.createStatement();
       String query= "select * from product";
       rs=stmt.executeQuery(query);
            
       JRResultSetDataSource rsdt = new JRResultSetDataSource(rs);
       String jasperReport = "/home/sakshi/JaspersoftWorkspace/MyReports/JasperProduct.jasper";
       JasperPrint jp1 = JasperFillManager.fillReport(jasperReport, new HashMap<String, Object>(),rsdt);
        JasperViewer jv = new JasperViewer(jp1);
        jv.setVisible(true);
        con.close();
  }
  catch(Exception e) {
        e.printStackTrace();
  }
Jrxml code-
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.2.final using JasperReports Library version 6.12.2-75c5e90a222ab406e416cbf590a5397028a52de3 -->
<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="JasperProduct" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0d6d7195-8cff-4512-be5d-258e505e6836">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Dataset1" uuid="0dc50125-a9d2-458b-82aa-27bfa253f3e9">
<queryString>
<![CDATA[]]>
</queryString>
<field name="id" class="java.lang.Integer"/>
<field name="prouductname" class="java.lang.String"/>
<field name="productprize" class="java.lang.String"/>
<field name="company" class="java.lang.String"/>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<field name="id" class="java.lang.Integer"/>
<field name="prouductname" class="java.lang.String"/>
<field name="productprize" class="java.lang.String"/>
<field name="company" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
<staticText>
<reportElement x="0" y="20" width="802" height="30" uuid="463c4bc3-254d-4c78-a35e-0096dc006165"/>
<box leftPadding="5"/>
<textElement verticalAlignment="Middle">
<font size="24"/>
</textElement>
<text><![CDATA[Product Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="55" splitType="Stretch">
<staticText>
<reportElement x="5" y="17" width="110" height="30" uuid="836aa66c-e052-4ca1-ac75-feb821efa866"/>
<textElement verticalAlignment="Middle">
<font size="14"/>
</textElement>
<text><![CDATA[Report Count]]></text>
</staticText>
<textField textAdjust="StretchHeight">
<reportElement x="125" y="17" width="100" height="30" uuid="500a4853-c045-4897-a007-6e77598a31c7"/>
<textElement verticalAlignment="Middle">
<font size="14"/>
</textElement>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="199" splitType="Stretch">
<componentElement>
<reportElement x="0" y="34" width="802" height="126" uuid="dc722ea3-7c31-439b-996c-bb3892426aea">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<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"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Dataset1" uuid="2c3773b9-e3a5-4046-a9d7-825487945fbb">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
<jr:columnGroup width="802" uuid="35fb663c-fc50-45f9-8715-575fe5aa27f4">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [4]"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="802" height="30" uuid="9cdc6108-4308-449a-9995-182837f26b4d"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="18"/>
</textElement>
<text><![CDATA[Product Details]]></text>
</staticText>
</jr:tableHeader>
<jr:columnGroup width="802" uuid="2282f969-105d-4cf7-9714-ce0eef6e7a2a">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [4]"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1">
<textField textAdjust="StretchHeight">
<reportElement mode="Opaque" x="0" y="0" width="802" height="30" uuid="4aa3d9f1-22dd-44bb-b002-b1fc83349c66"/>
<textElement verticalAlignment="Middle">
<font size="13"/>
</textElement>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:tableFooter>
<jr:column width="200" uuid="88208a30-4a0d-4a22-8558-c9347efcab95">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="200" height="30" uuid="c7b0da69-05cb-4e00-b215-501476c06697"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Id]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="200" height="30" uuid="69c964ef-8985-4b28-adf2-eb89663ffa3c"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{id}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="190" uuid="26ed996c-7261-48e1-bfdd-5492a313bee9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="190" height="30" uuid="294980bc-20b3-472e-999f-5be40daacf01"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Product Name]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="190" height="30" uuid="30e24e73-2357-40a9-ba78-a8dff9938ab9"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{prouductname}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="220" uuid="efd0925b-65d3-438e-950c-95fefc05998e">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="220" height="30" uuid="1480c534-2f5f-4cc7-96be-e275415b8cd0"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Product Prize]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="220" height="30" uuid="2df7f400-4845-4ebe-a874-c3ae91ccba2e"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{productprize}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="192" uuid="dfd8aead-b732-4300-8a47-29b0a6b7605b">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:columnHeader style="Table_CH" height="30">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="192" height="30" uuid="7fac6d69-f0eb-4ff2-82de-152872d9930d"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Company]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="30">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="192" height="30" uuid="701bebcf-d200-4cf8-bd88-37f4578be852"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{company}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:columnGroup>
</jr:columnGroup>
</jr:table>
</componentElement>
</band>
</detail>
<pageFooter>
<band height="62">
<staticText>
<reportElement x="0" y="20" width="160" height="30" uuid="dca10f20-8fa6-4e1b-8d48-16b549783ac6"/>
<box leftPadding="3">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font size="13" isBold="true"/>
</textElement>
<text><![CDATA[Company Name: ]]></text>
</staticText>
<textField textAdjust="StretchHeight">
<reportElement x="160" y="20" width="642" height="30" uuid="2e69e42c-7588-429b-a0dc-42042e24bd61"/>
<box leftPadding="3">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font size="13"/>
</textElement>
<textFieldExpression><![CDATA[$F{company}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>
I have seen different approaches-
add a first empty row to the datasource before passing it to the
report.
passing two data sources- one to table and one to main
report.(But both work on the same datasource so it reduces the
performance).
But I don't think these approaches are good.
And also referred to different references but they didn't work according to my design requirement-
Why is my subdataset blank when I run report from Java code?
http://zetcode.com/articles/jaspertable/
http://junaedhalim.blogspot.com/2009/12/creating-jasperreport-with-subreports.html
https://community.jaspersoft.com/questions/540719/resolved-table-report-missing-1st-tablemodel-row
https://community.jaspersoft.com/questions/817326/table-not-displaying-any-values
Jasper Reports how to set data from JRResultSetDataSource into Table component
Can anyone please suggest a better approach for resolving this issue.
Thanks in advance

How to connect subreport to main report

Hi I have try to make a sub report using jasper but when I connect it, it can't show up when I preview, On every tutorial the example always connect to database or query, but in this case, I want make report that connnect to database using java code so the connection will be in java not in the jasper. how can i do this?
this the sub report
<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="TargetSDSubReport" pageWidth="270" pageHeight="842" columnWidth="270" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="d736a7f6-85b9-4772-bd5a-2c325d35d2db">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<parameter name="listGroup" class="java.util.List"/>
<field name="targetSD" class="java.lang.String"/>
<field name="targetSDDesc" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<columnHeader>
<band height="20" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="5" y="0" width="25" height="20" uuid="1a90696a-6d79-4eea-95b5-b95afc13c8de"/>
<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"/>
</textElement>
<text><![CDATA[No]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="30" y="0" width="100" height="20" uuid="1a90696a-6d79-4eea-95b5-b95afc13c8de"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[ Target SD]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="130" y="0" width="130" height="20" uuid="1a90696a-6d79-4eea-95b5-b95afc13c8de"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[ Deskripsi SD]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="5" y="0" width="25" height="20" uuid="e5302991-ecff-4b9b-80ad-915c3e85b822"/>
<box rightPadding="2">
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="30" y="0" width="100" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<box leftPadding="1" rightPadding="1">
<topPen lineWidth="0.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{targetSD}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="130" y="0" width="130" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<box leftPadding="1" rightPadding="1">
<topPen lineWidth="0.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{targetSDDesc}]]></textFieldExpression>
</textField>
</band>
</detail>
I want to know, did I must set the parameter to this sub report ?? if yes, how to set it
this the main Report
<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="PRPKReportPDF" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="58db78df-f84a-40cb-b718-7df30c5ec33a">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="listGroup" class="java.util.List"/>
<field name="prpkNumber" class="java.lang.String"/>
<field name="prpkTypeName" class="java.lang.String"/>
<field name="createdDate" class="java.util.Date"/>
<field name="picPRPKName" class="java.lang.String"/>
<field name="businessUnitName" class="java.lang.String"/>
<field name="departmentName" class="java.lang.String"/>
<field name="prpkDescription" class="java.lang.String"/>
<field name="prpkRequest" class="java.lang.String"/>
<field name="prpkBackground" class="java.lang.String"/>
<field name="prpkAnalysis" class="java.lang.String"/>
<field name="priorityName" class="java.lang.String"/>
<field name="cost" class="java.lang.Integer"/>
<field name="targetSD" class="java.lang.String"/>
<field name="targetSDDesc" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="36" splitType="Stretch">
<staticText>
<reportElement x="0" y="6" width="555" height="30" uuid="7d980369-4787-4228-af9a-c3efb11e45ad"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="true"/>
</textElement>
<text><![CDATA[PEMBUATAN / REVISI PROGRAM KOMPUTER]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="14" splitType="Stretch">
<staticText>
<reportElement x="182" y="-6" width="125" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[PRPK No.]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="274" y="-6" width="125" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{prpkNumber}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="470" splitType="Stretch">
<staticText>
<reportElement x="0" y="10" width="125" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Jenis PRPK]]></text>
</staticText>
<staticText>
<reportElement x="220" y="10" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="35" width="125" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Tanggal Dibuat]]></text>
</staticText>
<staticText>
<reportElement x="220" y="35" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="60" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Pihak yang membutuhkan]]></text>
</staticText>
<staticText>
<reportElement x="0" y="85" width="125" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Nama]]></text>
</staticText>
<staticText>
<reportElement x="220" y="85" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="110" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[OPU / Business Unit]]></text>
</staticText>
<staticText>
<reportElement x="220" y="110" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="135" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Divisi / Dept. / Lokasi]]></text>
</staticText>
<staticText>
<reportElement x="220" y="135" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="160" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Program yang diminta]]></text>
</staticText>
<staticText>
<reportElement x="220" y="160" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="220" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Uraian Permintaan *]]></text>
</staticText>
<staticText>
<reportElement x="220" y="220" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="280" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Latar Belakang]]></text>
</staticText>
<staticText>
<reportElement x="220" y="280" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="340" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Analisa Manfaat]]></text>
</staticText>
<staticText>
<reportElement x="220" y="340" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="400" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Tingkat Kepentingan]]></text>
</staticText>
<staticText>
<reportElement x="220" y="400" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="425" width="182" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[Jumlah Investasi yang dibutuhkan]]></text>
</staticText>
<staticText>
<reportElement x="220" y="425" width="30" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[: Rp.]]></text>
</staticText>
<staticText>
<reportElement x="0" y="450" width="200" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[SD / Information Technology Tujuan]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="230" y="10" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{prpkTypeName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="35" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{createdDate}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="85" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{picPRPKName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="110" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{businessUnitName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="135" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{departmentName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="160" width="260" height="60" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$F{prpkDescription}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="220" width="260" height="60" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$F{prpkRequest}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="280" width="260" height="60" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$F{prpkBackground}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="340" width="260" height="60" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$F{prpkAnalysis}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="230" y="400" width="260" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{priorityName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="250" y="425" width="240" height="20" uuid="016a6929-6c92-4bf3-815f-027e1b0b84e2"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{cost}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="220" y="450" width="10" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
</band>
<band height="100">
<subreport>
<reportElement x="0" y="0" width="555" height="100" uuid="30fd3354-519f-4169-99fe-73879681bef2"/>
<parametersMapExpression><![CDATA[$P{listGroup}]]></parametersMapExpression>
<subreportParameter name="Target SD">
<subreportParameterExpression><![CDATA[$F{targetSD}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="Target SD Description">
<subreportParameterExpression><![CDATA[$F{targetSDDesc}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{listGroup})]]></connectionExpression>
<subreportExpression><![CDATA["TargetSDSubReport.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band height="108" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="150" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Persetujuan ***]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="150" y="0" width="255" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Tanggapan dan Pandangan]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="405" y="0" width="150" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Pihak yang Membutuhkan **]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="0" y="20" width="150" height="60" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
</staticText>
<staticText>
<reportElement mode="Opaque" x="150" y="20" width="127" height="60" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
</staticText>
<staticText>
<reportElement mode="Opaque" x="277" y="20" width="128" height="60" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
</staticText>
<staticText>
<reportElement mode="Opaque" x="405" y="20" width="150" height="60" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
</staticText>
<staticText>
<reportElement mode="Opaque" x="0" y="80" width="150" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[CEO]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="150" y="80" width="127" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Senior Manager / EX Dir]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="277" y="80" width="128" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Jr. Manager / Manager]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="405" y="80" width="150" height="20" uuid="cb56e179-31af-405a-b6dc-c0477d9b959d"/>
<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"/>
</textElement>
<text><![CDATA[Supervisor]]></text>
</staticText>
</band>
</columnFooter>
<pageFooter>
<band height="80" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="555" height="40" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[*Rincian dari uraian permintaan dan juga tanggapan (counter) dari pihak Information Technology dapat disajikan di lembar lain, jika lembar ini tidak mencukupi.]]></text>
</staticText>
<staticText>
<reportElement x="0" y="40" width="555" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[** Setidaknya dengan tingkat Sr.Mgr.]]></text>
</staticText>
<staticText>
<reportElement x="0" y="60" width="555" height="20" uuid="d1375f2a-e5cc-40fc-8c58-fa669f8d3731"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="12" isBold="false"/>
</textElement>
<text><![CDATA[*** Disetujui oleh CEO, hanya jika ada jumlah (Rp.) investasi.]]></text>
</staticText>
</band>
</pageFooter>
this main report if on sub report I must set the parameter, on this main report how to call the parameter of sub report and where i must to write it ??

compile-reports (default) on project prs-reporting: Error compiling report design

How can i fix this error to compile this report. Can anyone explain to me about field not found error. I am very newbie in ireport and this is my first time and this is frustratin. BTW, in my report i want to output the java.util.List data in my report. please help me.
my error trace:
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :       1. Field not found : itemDescs      2. Field not found : quantity      3. Field not found : units      4. Field not found : requestReason
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:498)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
my xml
<?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="PurchaseRequestReport" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<subDataset name="ItemDescription">
<queryString>
<![CDATA[]]>
</queryString>
<field name="itemDescs" class="java.lang.String">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
</subDataset>
<subDataset name="Quantity">
<field name="quantity" class="java.lang.String">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
</subDataset>
<subDataset name="Unit">
<field name="units" class="java.lang.String">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
</subDataset>
<subDataset name="RequestReason">
<field name="requestReason" class="java.lang.String">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
</subDataset>
<subDataset name="dataset1"/>
<subDataset name="dataset2"/>
<subDataset name="dataset3"/>
<subDataset name="dataset4"/>
<field name="reqUnit" class="java.lang.String"/>
<field name="reqNum" class="java.lang.String"/>
<field name="reqDate" class="java.lang.String"/>
<field name="localNum" class="java.lang.String"/>
<field name="capex" class="java.lang.String"/>
<field name="capexCode" class="java.lang.String"/>
<field name="justification" class="java.lang.String"/>
<field name="itemDesc" class="java.util.List"/>
<field name="qty" class="java.util.List"/>
<field name="unit" class="java.util.List"/>
<field name="reqReason" class="java.util.List"/>
<field name="remarks" class="java.lang.String"/>
<field name="prepareBy" class="java.lang.String"/>
<field name="noteBy" class="java.lang.String"/>
<field name="approveBy" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="802" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="555" height="20"/>
<textElement textAlignment="Center"/>
<text><![CDATA[ST. LUKE'S MEDICAL CENTER]]></text>
</staticText>
<staticText>
<reportElement x="0" y="13" width="555" height="20"/>
<textElement textAlignment="Center"/>
<text><![CDATA[PURCHASE REQUISITION]]></text>
</staticText>
<staticText>
<reportElement x="0" y="28" width="555" height="20"/>
<textElement textAlignment="Center"/>
<text><![CDATA[(For Non-Stock Items)]]></text>
</staticText>
<staticText>
<reportElement x="0" y="47" width="343" height="28"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Request Number : ]]></text>
</staticText>
<staticText>
<reportElement x="0" y="75" width="343" height="28"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Requesting Unit :]]></text>
</staticText>
<staticText>
<reportElement x="343" y="47" width="212" height="28"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Date :]]></text>
</staticText>
<staticText>
<reportElement x="343" y="75" width="212" height="28"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Local Number :]]></text>
</staticText>
<rectangle>
<reportElement x="0" y="103" width="555" height="78"/>
</rectangle>
<staticText>
<reportElement x="0" y="104" width="344" height="28"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Capital Expenditure :]]></text>
</staticText>
<staticText>
<reportElement x="343" y="104" width="212" height="28"/>
<box leftPadding="3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Capex Code :]]></text>
</staticText>
<staticText>
<reportElement x="0" y="131" width="555" height="50"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[Justification :]]></text>
</staticText>
<rectangle>
<reportElement x="0" y="181" width="555" height="304"/>
</rectangle>
<staticText>
<reportElement x="0" y="182" width="235" height="20"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[ITEM DESCRIPTION]]></text>
</staticText>
<staticText>
<reportElement x="234" y="182" width="52" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="12"/>
</textElement>
<text><![CDATA[QTY]]></text>
</staticText>
<staticText>
<reportElement x="285" y="182" width="70" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="12"/>
</textElement>
<text><![CDATA[UNIT]]></text>
</staticText>
<staticText>
<reportElement x="354" y="182" width="201" height="20"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[REQUEST REASON]]></text>
</staticText>
<componentElement>
<reportElement stretchType="RelativeToBandHeight" x="0" y="201" width="235" height="49" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<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="dataset1">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="49" width="235">
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="235" height="49"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{itemDescs}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<componentElement>
<reportElement stretchType="RelativeToBandHeight" x="234" y="201" width="52" height="49" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<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="dataset2">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="49" width="52">
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="52" height="49"/>
<textElement textAlignment="Center">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{quantity}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<componentElement>
<reportElement stretchType="RelativeToBandHeight" x="285" y="201" width="70" height="49" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<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="dataset3">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="49" width="70">
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="70" height="49"/>
<textElement textAlignment="Center">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{units}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<componentElement>
<reportElement stretchType="RelativeToBandHeight" x="354" y="201" width="201" height="49" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<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="dataset4">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="49" width="201">
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="201" height="49"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{requestReason}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement x="0" y="425" width="555" height="60"/>
<box leftPadding="3"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[Remarks :]]></text>
</staticText>
<staticText>
<reportElement x="0" y="485" width="286" height="35"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Prepared By :]]></text>
</staticText>
<staticText>
<reportElement x="0" y="520" width="286" height="35"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Noted By :]]></text>
</staticText>
<staticText>
<reportElement x="286" y="485" width="269" height="35"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Checked By :]]></text>
</staticText>
<staticText>
<reportElement x="286" y="520" width="269" height="35"/>
<box leftPadding="3">
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Approved By :]]></text>
</staticText>
<textField>
<reportElement x="99" y="75" width="244" height="29"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{reqUnit}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="105" y="48" width="238" height="27"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{reqNum}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="379" y="47" width="176" height="28"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{reqDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="431" y="75" width="124" height="28"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{localNum}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="118" y="103" width="225" height="28"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{capex}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="422" y="104" width="133" height="27"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{capexCode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="77" y="132" width="478" height="49"/>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{justification}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="66" y="425" width="488" height="60"/>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{remarks}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="77" y="485" width="209" height="35"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{prepareBy}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="77" y="520" width="209" height="35"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{noteBy}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="365" y="520" width="189" height="35"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{approveBy}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
your list contains object(class) , this object have fields, you must put the same name of these fields and set their data type on your reportName.jrxml as is in your class.
if there is a field in your class that is itself another object or classe you must use steps
your classe contains a field product and product has a field qte
in your report fields put product.qte
You are getting the fields from their respective datasets. As you dont have any fields defined in dataset it is throwing this exception
JRValidationException: Report design not valid :
1. Field not found : itemDescs
2. Field not found : quantity
3. Field not found : units
4. Field not found : requestReason
from error it is clear that this fields are not available
to fix the validation exception add above fields in their respective datasets (dataset you assigned for each list component).
here is the code:
<subDataset name="dataset1">
<field name="itemDescs" class="java.lang.String"/>
</subDataset>
<subDataset name="dataset2">
<field name="quantity" class="java.lang.String"/>
</subDataset>
<subDataset name="dataset3">
<field name="units" class="java.lang.String"/>
</subDataset>
<subDataset name="dataset4">
<field name="requestReason" class="java.lang.String"/>
</subDataset>
And you'll not get this JRValidationException.

JasperReport Error : Source text : new java.lang.Integer(1)

When i compile my .jrxml file from iReport i have no issue and everything goes fine. but when I try to print from my Java program it's show an error like this:
Error evaluating expression : Source text : new java.lang.Integer(1)
Here is my .jrxml file
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TOM_list_ot_report" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="822" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="581e1703-9505-417f-be68-bada03c8d692">
<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>
</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>
</style>
<subDataset name="Table Dataset 1" uuid="8573296a-9744-48d2-bb40-8c4b100b3bc9"/>
<parameter name="ttLogo" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="client" class="java.lang.Object"/>
<field name="adresse" class="java.lang.Object"/>
<field name="refCommande" class="java.lang.String"/>
<field name="codeAccees" class="java.lang.String"/>
<field name="numeroTt" class="java.lang.String"/>
<field name="commandeEtat" class="java.lang.Object"/>
<field name="dateModif" class="java.util.Date"/>
<field name="dateContractuel" class="java.util.Date"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="89" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="822" height="58" forecolor="#000099" uuid="9d752cf8-e79a-4315-aff6-74fbf7c58a0e"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="28" isBold="true"/>
</textElement>
<text><![CDATA[Commande livraison]]></text>
</staticText>
<image scaleImage="FillFrame" onErrorType="Blank">
<reportElement x="3" y="0" width="83" height="58" uuid="f5132dfc-fd13-43b3-9331-2eb7cc813690"/>
<imageExpression><![CDATA[$P{ttLogo}]]></imageExpression>
</image>
<textField pattern="dd/MM/yyyy HH.mm a" isBlankWhenNull="true">
<reportElement x="681" y="68" width="141" height="20" uuid="af0f8b1b-4a6e-49b7-84d9-d733bdf3f71f"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Transparent" x="663" y="68" width="16" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="7ef40ab2-434f-426f-979e-de7b35e7abac"/>
<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<text><![CDATA[LE]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="537" y="68" width="123" height="20" isRemoveLineWhenBlank="true" uuid="6892eaba-9d98-43ba-8ca6-8207d840f6ae">
<printWhenExpression><![CDATA[($F{adresse} != null) && ($F{adresse}.getRegionDTO() != null)]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{adresse}.getRegionDTO().getLibelleRegion()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="113" y="68" width="130" height="20" isRemoveLineWhenBlank="true" uuid="7217ea18-cb33-497e-a81d-47693a082e94">
<printWhenExpression><![CDATA[($F{adresse} != null) && ($F{adresse}.getRegionDTO() != null)]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{adresse}.getRegionDTO().getLibelleRegion()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="3" y="68" width="110" height="20" uuid="97975b5e-d13a-4ccb-9c5a-0ff5e5ccfa33"/>
<box rightPadding="5"/>
<textElement verticalAlignment="Middle">
<font fontName="Serif" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Direction regionale de :]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="21"/>
</pageHeader>
<columnHeader>
<band height="20">
<rectangle>
<reportElement x="0" y="0" width="179" height="20" backcolor="#CCFFFF" uuid="6eab9b5b-ac19-432e-991e-00f335d798ea"/>
</rectangle>
<rectangle>
<reportElement x="179" y="0" width="52" height="20" backcolor="#CCFFFF" uuid="17822259-754f-4b8b-8684-f141f6379f3e"/>
</rectangle>
<rectangle>
<reportElement x="231" y="0" width="63" height="20" backcolor="#CCFFFF" uuid="14c21801-ecd6-45c9-8ded-3d72d8fdecfa"/>
</rectangle>
<rectangle>
<reportElement x="294" y="0" width="89" height="20" backcolor="#CCFFFF" uuid="89beeeee-3d35-49fb-93ef-0b997db15681"/>
</rectangle>
<rectangle>
<reportElement x="383" y="0" width="144" height="20" backcolor="#CCFFFF" uuid="07215401-8b52-420d-9b2d-af2b49f11f70"/>
</rectangle>
<rectangle>
<reportElement x="527" y="0" width="140" height="20" backcolor="#CCFFFF" uuid="15d4de45-b59d-40b9-a317-11d3db940cc6"/>
</rectangle>
<rectangle>
<reportElement x="667" y="0" width="64" height="20" backcolor="#CCFFFF" uuid="e32b46cb-8c79-415f-b837-b1e455bc538d"/>
</rectangle>
<rectangle>
<reportElement x="731" y="0" width="91" height="20" backcolor="#CCFFFF" uuid="daa5973a-d676-473a-b4dd-e5a7d2ff3a12"/>
</rectangle>
<staticText>
<reportElement x="0" y="0" width="179" height="20" uuid="c045c618-ae04-4267-9146-0e81a7dcfc9b"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Ref. Commande]]></text>
</staticText>
<staticText>
<reportElement x="179" y="0" width="52" height="20" uuid="7a049ea7-efee-492b-85dc-2524a1ff3ae6"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Numéro]]></text>
</staticText>
<staticText>
<reportElement x="231" y="0" width="63" height="20" uuid="1239f061-63fd-441e-af4a-0cda6c733ff7"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Id Access]]></text>
</staticText>
<staticText>
<reportElement x="294" y="0" width="89" height="20" uuid="cd63d966-725e-4e23-8127-d97559e2651f"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Nom et prénom ]]></text>
</staticText>
<staticText>
<reportElement x="383" y="0" width="144" height="20" uuid="bd6a1270-45e2-432b-86b3-ec6b0d86d7c9"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Adresse installation]]></text>
</staticText>
<staticText>
<reportElement x="527" y="0" width="140" height="20" uuid="a6bb97eb-d4d5-4188-ae80-51ca1706c1c7"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Etat commande]]></text>
</staticText>
<staticText>
<reportElement x="667" y="0" width="64" height="20" uuid="6c678f82-a385-4c95-80cc-609d3506ab19"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Date état]]></text>
</staticText>
<staticText>
<reportElement x="731" y="0" width="91" height="20" uuid="a47f5765-1f07-4b8a-ba9b-ac330bedffa8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[Date contractuel]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="32" splitType="Stretch">
<rectangle>
<reportElement x="0" y="0" width="179" height="32" uuid="ec0f3d1e-71e0-49a8-af72-3b878bc1737d"/>
</rectangle>
<rectangle>
<reportElement x="179" y="0" width="52" height="32" uuid="fe0f82ad-508a-493a-af0f-835a93a3c9ea"/>
</rectangle>
<rectangle>
<reportElement x="231" y="0" width="63" height="32" uuid="4e6fefd5-9b92-451c-a4f0-a91e7d68c8f0"/>
</rectangle>
<rectangle>
<reportElement x="294" y="0" width="89" height="32" uuid="552df758-27c4-4800-b499-9be13265694c"/>
</rectangle>
<rectangle>
<reportElement x="383" y="0" width="144" height="32" uuid="5bcb83e6-3cbb-443a-83b9-ddedf55c573e"/>
</rectangle>
<rectangle>
<reportElement x="527" y="0" width="140" height="32" uuid="102743e9-f3cf-4100-a616-b0adb77dec36"/>
</rectangle>
<rectangle>
<reportElement x="667" y="0" width="64" height="32" uuid="071d3f95-5839-43ac-8bb2-9fb85df2f7c0"/>
</rectangle>
<rectangle>
<reportElement x="731" y="0" width="91" height="32" uuid="5567c999-0396-46e1-b876-a9c496f38267"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement x="6" y="0" width="169" height="32" isRemoveLineWhenBlank="true" uuid="e364eaad-cfb7-4df7-95cb-831522e56594"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{refCommande}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="184" y="0" width="42" height="32" isRemoveLineWhenBlank="true" uuid="9ee64eaf-d92e-469a-bd84-150309c21fda"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroTt}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="236" y="0" width="53" height="32" isRemoveLineWhenBlank="true" uuid="5a3954a9-378f-4879-afac-11732b8dcf23"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{codeAccees}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="299" y="0" width="79" height="32" isRemoveLineWhenBlank="true" uuid="4b2c6948-0b49-4950-93c9-a6fa8f579032">
<printWhenExpression><![CDATA[$F{client} != null]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{client}.getFullName()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="388" y="0" width="134" height="32" isRemoveLineWhenBlank="true" uuid="4e8bf206-9f34-4633-b070-225bb02bb9a5">
<printWhenExpression><![CDATA[$F{adresse} != null]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{adresse}.getAdresseLabel()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="532" y="0" width="130" height="32" isRemoveLineWhenBlank="true" uuid="6085dd50-e9e6-47e9-9622-577e224b4306">
<printWhenExpression><![CDATA[$F{commandeEtat} != null]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{commandeEtat}.getLibEtatCmd()]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy h.mm a" isBlankWhenNull="true">
<reportElement x="672" y="0" width="54" height="32" isRemoveLineWhenBlank="true" uuid="3b8f5c69-ae9c-4dd8-9f8f-00ed310d39c5"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{dateModif}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement x="737" y="0" width="81" height="32" isRemoveLineWhenBlank="true" uuid="33512a65-6207-4805-93a2-4cc48c580ac4"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{dateContractuel}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="14"/>
</pageFooter>
</jasperReport>
Any ideas ?
UPDATE
I tried to change the language to Java. and i got some errors when i compile:
The method getRegionDTO() is undefined for the type Object
The method getRegionDTO() is undefined for the type Object
The method getRegionDTO() is undefined for the type Object
The method getFullName() is undefined for the type Object
The method getAdresseLabel() is undefined for the type Object
The method getLibEtatCmd() is undefined for the type Object
I just changed the version to groovy 2.0.1. I had the groovy 1.7.5 version which doesn't match the jasper 5.5.0.
This post helped me fix the issue.