is it possible print element only when its detail band is the last on page? - jasper-reports

Is it possible, to get a condition, that I can print an element only when its detail band is the last on page in Jasper Reports?
We can have variable saying record number on the page. But how we get the calculated total record on each page?

This is done with the "reset type" on a variable
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1" language="groovy" pageWidth="612" pageHeight="792" columnWidth="612" leftMargin="0" rightMargin="0" topMargin="10" bottomMargin="10" uuid="39852bd8-6125-4359-8d76-06927e7be492">
<queryString>
<![CDATA[SELECT ROWNUM N FROM dual CONNECT BY LEVEL <= 200 ]]>
</queryString>
<field name="N" class="java.math.BigDecimal"/>
<variable name="N_count_page" class="java.lang.Integer" resetType="Page" calculation="Count">
<variableExpression><![CDATA[$F{N}]]></variableExpression>
</variable>
<variable name="N_count_report" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{N}]]></variableExpression>
</variable>
<title>
<band height="20" splitType="Stretch">
<textField>
<reportElement uuid="93284d9f-1ee0-4a15-b227-31b55aa2e48b" x="0" y="0" width="376" height="20"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Page Count"]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="20">
<staticText>
<reportElement uuid="a7113fdd-591b-4fee-9123-981ab75c6fa6" mode="Opaque" x="0" y="0" width="100" height="20" forecolor="#FFFFFF" backcolor="#000000"/>
<textElement/>
<text><![CDATA[N]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="20">
<textField>
<reportElement uuid="54bac746-4efb-4412-81bc-b4ba807c60fd" x="0" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{N}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="50">
<staticText>
<reportElement uuid="4c685263-0ef7-4a68-a328-39901ef2806f" x="0" y="0" width="100" height="20"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Rows on page :]]></text>
</staticText>
<textField>
<reportElement uuid="c65214f1-82dc-476a-8439-087854bbc5c6" x="100" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$V{N_count_page}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="48b37aff-b169-4ca2-b9dd-30c026988f68" x="289" y="30" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement uuid="983ccfed-d783-429e-bc6c-3fa488b2e106" x="369" y="30" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<lastPageFooter>
<band height="64">
<staticText>
<reportElement uuid="240e2f86-991a-4fc1-941b-56cc43b28c25" x="0" y="24" width="100" height="20"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Rows on report :]]></text>
</staticText>
<textField>
<reportElement uuid="718d4481-4716-4071-9989-27d5119fb428" x="100" y="24" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$V{N_count_report}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement uuid="f03359be-3bbe-4da8-9bd8-ac024aa6f289" x="369" y="44" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ad4aa2c0-9ad8-4892-a16f-0bb584c93916" x="289" y="44" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="b4bdd29a-4ef9-46cc-a57a-df7577bdd73f" x="0" y="0" width="100" height="20"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Rows on page :]]></text>
</staticText>
<textField>
<reportElement uuid="39952747-170c-4747-8e2c-0e12ab608ae9" x="100" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$V{N_count_page}]]></textFieldExpression>
</textField>
</band>
</lastPageFooter>
</jasperReport>

Related

Why is my expression off by 1 record?

I have a report that i am making using iReport and I have an equation that is helping me find duplicate Estimated Shipping variables and make the initial number stay the same but the ones displayed after it appear as 0. I want this because the report shows the changes made to the Sales Order but I dont want the report showing that the person was charged the initial Estimated Shipping ammount- every time.
The equation I am using to find the duplicates is
$V{SOID_Count}<=1?$F{SOITEM_UNITPRICE}:0
This works but if you notice in this picture the numbers are behind by one.
It is subtracting the Estimated Shipping amount that was above it- from the current Actual Shipping amount that you are on.
So how can I alter my counter equation to fix this?
Thank you for any help!
This is 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="ShippingPriceDifference" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="97636279-f825-4b72-b9f8-8ce9740dce34">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="To" class="java.util.Date">
<parameterDescription><![CDATA[asdf]]></parameterDescription>
</parameter>
<parameter name="From" class="java.util.Date"/>
<queryString>
<![CDATA[SELECT
CUSTOMER."NAME" AS CUSTOMER_NAME,
SO."NUM" AS SO_NUM,
COMPANY."NAME" AS COMPANY_NAME,
SHIPCARTON."FREIGHTAMOUNT" AS SHIPCARTON_FREIGHTAMOUNT,
SHIP."SOID" AS SHIP_SOID,
SOITEM."UNITPRICE" AS SOITEM_UNITPRICE,
PRODUCT."PARTID" AS PRODUCT_PARTID,
SHIP."DATESHIPPED" AS SHIP_DATESHIPPED,
SOITEM."SOID" AS SOITEM_SOID
FROM
"CUSTOMER" CUSTOMER INNER JOIN "SO" SO ON CUSTOMER."ID" = SO."CUSTOMERID"
INNER JOIN "SHIP" SHIP ON SO."ID" = SHIP."SOID"
INNER JOIN "SOITEM" SOITEM ON SO."ID" = SOITEM."SOID"
INNER JOIN "PRODUCT" PRODUCT ON SOITEM."PRODUCTID" = PRODUCT."ID"
INNER JOIN "SHIPCARTON" SHIPCARTON ON SHIP."ID" = SHIPCARTON."SHIPID",
"COMPANY" COMPANY
WHERE
PRODUCT."PARTID" = 947
AND SHIP."DATESHIPPED" BETWEEN $P{From} AND $P{To}
AND SHIPCARTON."FREIGHTAMOUNT" != 0
ORDER BY
2 ASC]]>
</queryString>
<field name="CUSTOMER_NAME" class="java.lang.String"/>
<field name="SO_NUM" class="java.lang.String"/>
<field name="COMPANY_NAME" class="java.lang.String"/>
<field name="SHIPCARTON_FREIGHTAMOUNT" class="java.lang.Double"/>
<field name="SHIP_SOID" class="java.lang.Integer"/>
<field name="SOITEM_UNITPRICE" class="java.lang.Double"/>
<field name="PRODUCT_PARTID" class="java.lang.Integer"/>
<field name="SHIP_DATESHIPPED" class="java.sql.Timestamp"/>
<field name="SOITEM_SOID" class="java.lang.Integer"/>
<variable name="shipPriceDif" class="java.lang.Double">
<variableExpression><![CDATA[($F{SHIPCARTON_FREIGHTAMOUNT})- ($V{estimatedShipping})]]></variableExpression>
</variable>
<variable name="totalShipPriceDif" class="java.lang.Double" calculation="Sum">
<variableExpression><![CDATA[$V{shipPriceDif}]]></variableExpression>
</variable>
<variable name="SOID_Count" class="java.lang.Integer" resetType="Group" resetGroup="SOID" calculation="Count">
<variableExpression><![CDATA[$F{SOITEM_SOID}]]></variableExpression>
</variable>
<variable name="estimatedShipping" class="java.lang.Double">
<variableExpression><![CDATA[$V{SOID_Count}<=1?$F{SOITEM_UNITPRICE}:0]]> </variableExpression>
</variable>
<group name="SOID">
<groupExpression><![CDATA[$F{SOITEM_SOID}]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="27" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="555" height="25" uuid="64a1704a-b221-48a4-8186-1b855ead5acf"/>
<textElement textAlignment="Center">
<font fontName="SansSerif" size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{COMPANY_NAME}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="59" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="555" height="25" uuid="e20cae54-5d75-4e81-800c-55390d1ec465"/>
<textElement textAlignment="Center">
<font fontName="SansSerif" size="14"/>
</textElement>
<text><![CDATA[Shipping Price Difference ]]></text>
</staticText>
<staticText>
<reportElement x="0" y="25" width="167" height="20" uuid="41be06d8-8fdf-4e3b-b526-1aea092ea734"/>
<textElement textAlignment="Right">
<font fontName="SansSerif" size="14" isBold="false"/>
</textElement>
<text><![CDATA[Date Range:]]></text>
</staticText>
<staticText>
<reportElement x="267" y="25" width="20" height="20" uuid="a402544b-73b3-4132-8161-be4c202e9b14"/>
<textElement textAlignment="Center">
<font fontName="SansSerif" size="14" isBold="false"/>
</textElement>
<text><![CDATA[-]]></text>
</staticText>
<textField>
<reportElement x="287" y="25" width="100" height="20" uuid="85e7fe2b-8149-4b18-8410-16b026cdb0f3"/>
<textElement verticalAlignment="Middle">
<font fontName="SansSerif" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$P{To}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="167" y="25" width="100" height="20" uuid="ea618bea-9201-4eba-abff-cfdc891ac76f"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$P{From}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="21" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="140" height="20" uuid="82883a63-752d-4265-8158-a5129b617b7d"/>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Customer Name]]></text>
</staticText>
<staticText>
<reportElement x="140" y="0" width="75" height="20" uuid="2d302854-c68c-4e5a-b94b-900c88937b9d"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[SO #]]></text>
</staticText>
<staticText>
<reportElement x="455" y="0" width="100" height="20" uuid="50c6ba0f-a5df-4aa3-8a47-282271055053"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Difference]]></text>
</staticText>
<line>
<reportElement x="0" y="19" width="555" height="1" uuid="be790d1c-d6d6-4169-b743-a98654c025e9"/>
</line>
<staticText>
<reportElement x="215" y="0" width="120" height="20" uuid="ffbe1333-86b8-435f-b914-46bb1c747683"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Estimated Shipping]]></text>
</staticText>
<staticText>
<reportElement x="335" y="0" width="120" height="20" uuid="3f683f6b-19f6-49dd-9ee1-787b216aaa2f"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Actual Shipping]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="21" splitType="Stretch">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="140" height="20" isRemoveLineWhenBlank="true" uuid="fdd69c30-9da5-4bd2-a7b8-44a506e2d7ff"/>
<textFieldExpression><![CDATA[$F{CUSTOMER_NAME}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true" hyperlinkType="Reference">
<reportElement x="140" y="0" width="75" height="20" isRemoveLineWhenBlank="true" forecolor="#000099" uuid="19db6cb8-af37-46e6-9227-f1b55fc49f22"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{SO_NUM}]]></textFieldExpression>
<anchorNameExpression><![CDATA["SONum"]]></anchorNameExpression>
<hyperlinkReferenceExpression><![CDATA[$F{SO_NUM}]]></hyperlinkReferenceExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="335" y="0" width="120" height="20" isRemoveLineWhenBlank="true" uuid="006475e5-d36f-4482-97cf-2c2eda2d5a66"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{SHIPCARTON_FREIGHTAMOUNT}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="215" y="0" width="120" height="20" isRemoveLineWhenBlank="true" uuid="376d9c76-1d96-48ea-ac4a-40770ba28867"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{estimatedShipping}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
<reportElement x="455" y="0" width="100" height="20" isRemoveLineWhenBlank="true" uuid="c236c087-e6f4-4de6-a3d6-8abb8b798346"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{shipPriceDif}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="22" splitType="Stretch">
<textField>
<reportElement x="435" y="0" width="80" height="20" uuid="64e6c2aa-58eb-4994-83c3-16cb70197fef"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="515" y="0" width="40" height="20" uuid="09e2e08b-c9b1-4a5b-95fd-1c0a0dba17a2"/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="22" splitType="Stretch">
<textField pattern="#,##0.00;-#,##0.00">
<reportElement x="150" y="1" width="75" height="20" uuid="8ab3526d-e89e-4043-86dd-52d89a2b7b21"/>
<textElement verticalAlignment="Top">
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{totalShipPriceDif}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="140" y="1" width="10" height="20" uuid="110043fb-4dde-414e-b07f-f79cbb8839ab"/>
<textElement textAlignment="Right">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[$]]></text>
</staticText>
<line>
<reportElement x="0" y="0" width="555" height="1" uuid="e81602ee-7eab-43f3-90c1-cf69086623a9"/>
</line>
<staticText>
<reportElement x="0" y="1" width="140" height="20" uuid="095559e8-33e4-4a1a-9537-f8dff2b533d6"/>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Total Cost Difference :]]></text>
</staticText>
</band>
</summary>
</jasperReport>
Your problem is that the $V{estimatedShipping} is evaluated after your variable $V{shipPriceDif} since its after in your variable definition, or move it above or dump it...
Just calculate the Difference in the textField
<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
<reportElement x="455" y="0" width="100" height="20" isRemoveLineWhenBlank="true" uuid="c236c087-e6f4-4de6-a3d6-8abb8b798346"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{estimatedShipping}.doubleValue()-$F{SHIPCARTON_FREIGHTAMOUNT}.doubleValue()]]></textFieldExpression>
</textField>
The output of this would be:
+-------+-----------+--------+------------+
| SO# | Estimated | Actual | Difference |
+-------+-----------+--------+------------+
| 46137 | 700 | 58,38 | 641,62 |
| 46137 | 0 | 57,12 | -57.12 |
| 46137 | 0 | 28,29 | -28,29 |
| 46148 | 0,85 | 267,32 | -266,47 |
+-------+-----------+--------+------------+

Trying to get Jaspersoft Studio to Read Excel Numeric Values

I am using Jaspersoft Studio to create a JasperReports's report using an Excel file as data source (I have a couple of columns in excel with numeric values to which i have assigned the class java.lang.Number in fields). But when previewing the report, I get the following the error
"net.sf.jasperreports.engine.JRException: unable to get value for field 'Hours' of class java.lang.Number"
Any inputs please?
Here is my jrxml file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 -->
<!-- 2014-09-25T18:35:44 -->
<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="Leaf_Grey" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="896e484a-2240-4304-afcc-7290c150d8b7">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter (4)"/>
<style name="Title" fontName="Arial" fontSize="26" isBold="true" pdfFontName="Helvetica-Bold"/>
<style name="SubTitle" forecolor="#666666" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="Task" class="java.lang.String"/>
<field name="Site Name" class="java.lang.String"/>
<field name="Hours" class="java.lang.Number"/>
<field name="Minutes" class="java.lang.Number"/>
<field name="Status" class="java.lang.String"/>
<field name="Comments" class="java.lang.String"/>
<field name="Employee Name" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="70" splitType="Stretch">
<image>
<reportElement x="275" y="0" width="300" height="64" uuid="8636fef6-bee7-4ac4-9942-653e5c68326b"/>
<imageExpression><![CDATA["leaf_banner_gray.png"]]></imageExpression>
</image>
<staticText>
<reportElement style="Title" x="0" y="13" width="263" height="33" uuid="4370ee46-32ee-4993-8fc6-fff1a5cbbb10"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Leaf Gray Title]]></text>
</staticText>
<staticText>
<reportElement style="SubTitle" x="117" y="46" width="157" height="22" uuid="e0a627c7-e8b9-4efb-8e25-85fea9d9be9c"/>
<text><![CDATA[Leaf Gray SubTitle]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="36" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="35" width="555" height="1" uuid="8545dbd1-d876-4d96-8abf-d6b221e00a45"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
<staticText>
<reportElement style="Column header" x="0" y="19" width="79" height="15" uuid="cac2a980-c74e-44b0-b596-05d495272ccb"/>
<text><![CDATA[Task]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="79" y="19" width="79" height="15" uuid="d55bebe9-d167-4528-a78c-a5a41af89efc"/>
<text><![CDATA[Site Name]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="158" y="19" width="79" height="15" uuid="667ce640-c671-4337-8f0c-d23b3f4b273c"/>
<text><![CDATA[Hours]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="237" y="19" width="79" height="15" uuid="df472e1f-39fb-4b34-b0b3-0867407df860"/>
<text><![CDATA[Minutes]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="316" y="19" width="79" height="15" uuid="05e27ddd-a03c-4ad6-8596-5cfc00655de7"/>
<text><![CDATA[Status]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="395" y="19" width="79" height="15" uuid="cefa7fbe-75bd-4923-82a6-da21a13d4f58"/>
<text><![CDATA[Comments]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="474" y="19" width="79" height="15" uuid="090b77e6-6a38-43b4-8501-6e1c3e246764"/>
<text><![CDATA[Employee Name]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="16" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="15" width="555" height="1" uuid="9b18ea63-f82d-4ef1-872e-8fde09656872"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
<textField>
<reportElement style="Detail" x="0" y="0" width="79" height="15" uuid="1f24eaab-1923-419e-9262-79b6c2b80499"/>
<textFieldExpression><![CDATA[$F{Task}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="79" y="0" width="79" height="15" uuid="f9b21e3a-3150-4744-a413-10cf734a2c3d"/>
<textFieldExpression><![CDATA[$F{Site Name}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="158" y="0" width="79" height="15" uuid="867d0368-9589-4c6b-8502-f71224a11a4c"/>
<textFieldExpression><![CDATA[$F{Hours}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="237" y="0" width="79" height="15" uuid="17715223-dbc6-462a-b80c-aeb54aa58932"/>
<textFieldExpression><![CDATA[$F{Minutes}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="316" y="0" width="79" height="15" uuid="3a3115d3-420d-4411-88cc-30b41f67443e"/>
<textFieldExpression><![CDATA[$F{Status}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="395" y="0" width="79" height="15" uuid="97194b34-07e1-49b4-aba0-af1efe7b9bf4"/>
<textFieldExpression><![CDATA[$F{Comments}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Detail" x="474" y="0" width="79" height="15" uuid="ba21b35b-74a9-45ee-862f-8752756350dd"/>
<textFieldExpression><![CDATA[$F{Employee Name}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="3" width="555" height="1" uuid="7d65af8c-8abe-40ae-9953-98342530289f"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnFooter>
<pageFooter>
<band height="20" splitType="Stretch">
<textField>
<reportElement style="Column header" x="433" y="0" width="80" height="20" uuid="afe06d42-bf57-40c1-9cbb-6e8a04a641e6"/>
<textElement textAlignment="Right">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement style="Column header" x="513" y="0" width="40" height="20" uuid="ee38e653-d5c9-4269-93a3-b1dcd2685d2c"/>
<textElement>
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="0" y="0" width="197" height="20" uuid="af6b71ba-3c04-4b3c-9b70-e18e46b27ff4"/>
<textElement>
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
And a sample excel file as follows:
Task Site Name Hours Minutes Status Comments Employee Name
Task A abc.com 3 45 Ongoing Easy Jim
Task B abc.com 1 20 Done Easy John
Task C abc.com 3 30 Ongoing Easy Jim
Task A abc.com 1 20 Done Easy John
Task D abc.com 3 45 Ongoing Easy Mary
Task A abc.com 1 20 Done Easy Stacy
Task E abc.com 3 30 Ongoing Easy Stacy
Task A abc.com 1 20 Done Easy Stacy
1) If the requirement is to change the Class to Number from String then, you need to click the checkbox "Use custom number pattern" and select a number pattern.
2) If there is no specific requirement, then its easy to select java.lang.Integer as the class for numbers. This will make the report work just fine.

Detail textField overlapping

I have a small detail JasperReports's report developed with iReport. I have the classic Header band and well a row with the values, but below I need to put another textField which is in fact very long up to 500 characters namely Observations. In the Detail row one field can have up to 100 characters (namely CONCEPT) which can cause textField stretch vertically this is working OK. The problem appears when the Concept textField grows vertically the Observations which is below the Detail row stays in the same positions cause both to overlap each other...
Here is some picture of the results so far.
My report has following design (view in iReport):
And the generated report look like this:
As you can see the Observations textField if overlapping the wrap line of the CONCEPTO textField.
UPDATE after following the tips from Alex K i am receving this output....
Here is the code of Detail band:
<detail>
<band height="36" splitType="Stretch">
<textField pattern="" isBlankWhenNull="true">
<reportElement x="349" y="0" width="61" height="19"/>
<textElement textAlignment="Center"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c04}+"€"]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement x="410" y="0" width="53" height="19"/>
<textElement textAlignment="Center"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c05}+"€"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="240" y="-1" width="57" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c06}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="68" y="0" width="172" height="19"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c03}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement x="297" y="0" width="51" height="19"/>
<textElement textAlignment="Center"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c02}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="67" height="19"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c07}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement positionType="Float" x="1" y="18" width="554" height="18"/>
<textElement textAlignment="Left"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{c08}]]></textFieldExpression>
</textField>
</band>
</detail>
You should set isStretchWithOverflow property as true for textField with long text (contains $F{c03} field in your case) and this properties for textField in the second row (contains $F{c08} field in your sample):
positionType with Float value;
stretchType with No stretch value;
isStretchWithOverflow with true value for support long text.
The sample
The 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="overlapping_test" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<queryString>
<![CDATA[]]>
</queryString>
<field name="c07" class="java.lang.String"/>
<field name="c03" class="java.lang.String"/>
<field name="c02" class="java.lang.String"/>
<field name="c04" class="java.lang.String"/>
<field name="c05" class="java.lang.String"/>
<field name="c08" class="java.lang.String"/>
<columnHeader>
<band height="20" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="92" height="20"/>
<textElement/>
<text><![CDATA[Code]]></text>
</staticText>
<staticText>
<reportElement x="92" y="0" width="92" height="20"/>
<textElement/>
<text><![CDATA[Concept]]></text>
</staticText>
<staticText>
<reportElement x="184" y="0" width="92" height="20"/>
<textElement/>
<text><![CDATA[Candidate]]></text>
</staticText>
<staticText>
<reportElement x="276" y="0" width="92" height="20"/>
<textElement/>
<text><![CDATA[Price]]></text>
</staticText>
<staticText>
<reportElement x="368" y="0" width="92" height="20"/>
<textElement/>
<text><![CDATA[Amount]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="40" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="92" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c07}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="92" y="0" width="92" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c03}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="184" y="0" width="92" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c02}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="276" y="0" width="92" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c04}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="368" y="0" width="92" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c05}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="0" y="20" width="460" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{c08}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
The report's design in iReport:
And the result (via preview in iReport):

What does "Expression list of the form (a; b; c) is not supported in this context" mean?

I am getting the error "Expression list of the form (a; b; c) is not supported in this context" when compiling a report, after removing some fields and adding a few new ones. This prevents the report from being compiled.
I am using iReport 5.1.0.
The full error is as follows:
Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector#19c51d5 net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: calculator_Events_1383802163165_797769: 325: Expression list of the form (a; b; c) is not supported in this context. at line: 325 column: 21. File: calculator_Events_1383802163165_797769 # line 325, column 21. 1 error     at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:113)     at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:201)     at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:240)     at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:156)     at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:439)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:528)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: calculator_Events_1383802163165_797769: 325: Expression list of the form (a; b; c) is not supported in this context. at line: 325 column: 21. File: calculator_Events_1383802163165_797769 # line 325, column 21. 1 error     at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)     at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:915)     at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564)     at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:540)     at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:517)     at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:109)     ... 7 more
As requested, the jrxml is as follows:
<?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="Events" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="81b33856-d23f-41e3-99a1-9ec1f42e7781">
<property name="ireport.zoom" value="1.6105100000000008"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="Title" fontName="Arial" fontSize="40" isBold="true" pdfFontName="Times-Bold"/>
<style name="Column Heading" forecolor="#736343" fontName="Arial" fontSize="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="Field Label" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="Detail" fill="Solid" fontName="Arial" fontSize="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="Row" mode="Transparent" fontName="Arial">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<field name="id" class="java.lang.Integer"/>
<field name="timedateStart" class="java.util.Date"/>
<field name="timedateEnd" class="java.util.Date"/>
<field name="timedateReported" class="java.util.Date"/>
<field name="areaStart" class="java.lang.String"/>
<field name="areaEnd" class="java.lang.String"/>
<field name="login" class="java.lang.String"/>
<field name="state" class="java.lang.String"/>
<field name="summary" class="java.lang.String"/>
<field name="details" class="java.lang.String"/>
<field name="tripInvolvement" class="java.lang.String"/>
<field name="tripName" class="java.lang.String"/>
<field name="itsrClass" class="java.lang.String"/>
<field name="closeoutComments" class="java.lang.String"/>
<field name="tripDate" class="java.lang.String"/>
<field name="tripFrom" class="java.lang.String"/>
<field name="tripTo" class="java.lang.String"/>
<field name="tripDelay" class="java.lang.String"/>
<field name="code" class="java.lang.String"/>
<field name="eventNumber" class="java.lang.String"/>
<field name="tripOperator" class="java.lang.String"/>
<field name="safetyComments" class="java.lang.String"/>
<group name="ID" keepTogether="true">
<groupExpression><![CDATA[$F{id}]]></groupExpression>
<groupHeader>
<band height="101">
<textField pattern="dd MMM yy HH:mm">
<reportElement uuid="ccf2faf4-1ebc-4833-bffb-be793843bfbb" style="Detail" x="89" y="29" width="95" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{timedateStart}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="bc927ec0-afbe-4acb-a2dd-30ed83bf87ca" style="Field Label" x="0" y="29" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Start Time:]]></text>
</staticText>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="ca7ec72f-66dc-48ee-a3ba-1a8ad24e5151" style="Detail" x="273" y="29" width="100" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{timedateEnd}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="e4b8515a-e1f4-46a2-b539-609918c274e8" style="Field Label" x="184" y="29" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[End Time:]]></text>
</staticText>
<textField>
<reportElement uuid="b77e01cd-299d-4de2-8087-c2a39dfad2c1" style="Detail" x="273" y="11" width="100" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{areaStart}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="8c7e8a18-8bc1-4458-a8ba-b08289f93d1f" style="Field Label" x="184" y="11" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Start Location:]]></text>
</staticText>
<textField>
<reportElement uuid="f70f1a2a-c8b9-49b8-b89c-e316c0f3d5a9" style="Detail" x="651" y="11" width="151" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{login}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="f66e357d-4951-4bbb-8c5a-7ef6620f2146" style="Field Label" x="562" y="11" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[User:]]></text>
</staticText>
<textField>
<reportElement uuid="62f6ee8e-2f53-4790-abc8-3eb18e0fc373" style="Detail" x="462" y="11" width="100" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{areaEnd}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="608c4c23-f157-4e67-8e3e-2d5e61b973da" style="Field Label" x="373" y="11" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[End Location:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement uuid="4e78d65d-579f-46d6-88a9-d32ad8c65603" style="Detail" x="651" y="29" width="151" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{state}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="df4c04ba-02b1-4a5a-85fe-73d696ed4baf" style="Field Label" x="562" y="29" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[State:]]></text>
</staticText>
<textField>
<reportElement uuid="5116325d-bfec-4937-a839-fcaf57ac91f3" style="Detail" x="89" y="65" width="714" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{summary}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="b98c7a80-a12c-4868-8e02-e075a156b085" style="Field Label" x="0" y="65" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Title:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="8e708653-5838-4046-a081-92035aa855fe" style="Detail" stretchType="RelativeToBandHeight" x="89" y="83" width="714" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{details}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="adc7448c-13a8-4911-b7b6-74e7b9261d7e" style="Field Label" x="0" y="83" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Details:]]></text>
</staticText>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="aa3bc766-6000-47f2-8e65-da927940c456" style="Detail" x="462" y="29" width="100" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{timedateReported}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="72920f21-de19-4494-bbe9-38ae43e263a2" style="Field Label" x="373" y="29" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Report Time:]]></text>
</staticText>
<line>
<reportElement uuid="13211da9-beb1-415c-ac7f-5389686ef661" x="0" y="5" width="802" height="1"/>
<graphicElement>
<pen lineWidth="5.75" lineStyle="Double"/>
</graphicElement>
</line>
<staticText>
<reportElement uuid="ad7bdabe-7f4b-4b72-b99d-6fe18afac7c0" style="Field Label" x="0" y="11" width="89" height="18"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Event Number:]]></text>
</staticText>
<textField>
<reportElement uuid="2148ce11-9119-48e8-8c91-002a7107fbcb" style="Detail" x="89" y="11" width="95" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{eventNumber}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="39bff358-7af5-4752-bfc4-f803bfadab40" style="Field Label" x="0" y="47" width="89" height="18">
<printWhenExpression><![CDATA[$F{code} != null]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right"/>
<text><![CDATA[Code:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement uuid="9730d29d-873b-4d29-b028-48404027e19b" style="Detail" x="89" y="47" width="95" height="18">
<printWhenExpression><![CDATA[$F{code} != null]]></printWhenExpression>
</reportElement>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{code}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="64">
<printWhenExpression><![CDATA[$F{itsrClass} != null]]></printWhenExpression>
<staticText>
<reportElement uuid="10f8cca4-d383-4ba1-9cf4-8795b1b0dd98" style="Field Label" isPrintRepeatedValues="false" x="1" y="6" width="183" height="20" printWhenGroupChanges="ID"/>
<textElement>
<font size="15"/>
</textElement>
<text><![CDATA[Categorisation]]></text>
</staticText>
<staticText>
<reportElement uuid="cfaee340-8abf-4197-8c08-10b10ef66dcf" style="Field Label" isPrintRepeatedValues="false" x="1" y="26" width="115" height="18" printWhenGroupChanges="ID"/>
<textElement textAlignment="Right"/>
<text><![CDATA[ITSR Classification:]]></text>
</staticText>
<staticText>
<reportElement uuid="78403c7e-1d15-4eea-aeca-cc401fbad57a" style="Field Label" isPrintRepeatedValues="false" x="1" y="44" width="115" height="18" printWhenGroupChanges="ID"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Safety Comments:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="b1edd0e3-7c49-4838-8fc8-6d699873ba85" style="Detail" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="117" y="26" width="684" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{itsrClass}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="b6973a40-0464-410a-9fa5-b3b814e36a31" style="Detail" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="117" y="44" width="684" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{safetyComments}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="5a3a0871-0b2b-4b8d-945b-755259a29f38" x="0" y="3" width="802" height="1"/>
</line>
</band>
<band height="20">
<printWhenExpression><![CDATA[$F{closeoutComments} != null]]></printWhenExpression>
<staticText>
<reportElement uuid="23b26dc6-d74b-45f5-b4f6-c91ca98613b0" style="Field Label" isPrintRepeatedValues="false" x="1" y="0" width="115" height="18" printWhenGroupChanges="ID"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Closeout:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="91479638-455b-4e46-a6f4-b3dd9d4dc2a8" style="Detail" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="117" y="0" width="684" height="18"/>
<textElement>
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{closeoutComments}]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
<group name="Trip">
<groupExpression><![CDATA[$F{tripInvolvement}]]></groupExpression>
<groupHeader>
<band height="20">
<printWhenExpression><![CDATA[$F{tripInvolvement} != null]]></printWhenExpression>
<staticText>
<reportElement uuid="1edf4f6a-4acb-4f8f-ac70-f1a3c754567e" style="Field Label" x="89" y="2" width="89" height="18"/>
<textElement/>
<text><![CDATA[Train]]></text>
</staticText>
<staticText>
<reportElement uuid="1f5c9a4e-c5bf-4d27-9f0c-21a42a65ecef" style="Field Label" x="178" y="2" width="100" height="18"/>
<textElement/>
<text><![CDATA[Date]]></text>
</staticText>
<staticText>
<reportElement uuid="1a8a189c-a27e-4ca5-b148-11ed220b2584" style="Field Label" x="515" y="2" width="89" height="18"/>
<textElement/>
<text><![CDATA[From]]></text>
</staticText>
<staticText>
<reportElement uuid="48030e71-fe77-4c61-a106-018c90e536a6" style="Field Label" x="603" y="2" width="100" height="18"/>
<textElement/>
<text><![CDATA[To]]></text>
</staticText>
<staticText>
<reportElement uuid="9c3b0468-afb7-4d7a-be92-db117bc397b2" style="Field Label" x="702" y="2" width="89" height="18"/>
<textElement/>
<text><![CDATA[Delay]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="f4afaf65-7726-4f41-9959-ab9ac23e38a5" style="Detail" stretchType="RelativeToBandHeight" x="0" y="2" width="89" height="18"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{tripInvolvement} != null ? ( $F{tripInvolvement}.equals( "primary" ) ? "Primary" : "Reactionary" ) : null]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="7017fd47-578c-4e81-b10f-e2958e53acd8" style="Field Label" x="277" y="2" width="239" height="18"/>
<textElement/>
<text><![CDATA[Operator]]></text>
</staticText>
<line>
<reportElement uuid="fa1ceb36-94f4-4663-a93d-238d17090a6c" x="1" y="0" width="801" height="1"/>
</line>
</band>
</groupHeader>
<groupFooter>
<band/>
</groupFooter>
</group>
<group name="ID Group Footer Response">
<groupExpression><![CDATA[$F{id}]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band height="62" splitType="Stretch">
<image isUsingCache="true">
<reportElement uuid="1da1169f-b408-446a-bb59-54c6c8fd916b" x="0" y="0" width="222" height="60"/>
<imageExpression><![CDATA["client_logo.png"]]></imageExpression>
</image>
<staticText>
<reportElement uuid="80d953b0-4a59-4da5-8a65-b837b70c5f00" style="Title" x="184" y="0" width="618" height="60"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="Times-Roman"/>
</textElement>
<text><![CDATA[Event Report]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="1" splitType="Stretch">
<line>
<reportElement uuid="65b62c3c-1b80-498e-94d5-892b9c188550" positionType="FixRelativeToBottom" x="0" y="0" width="802" height="1"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnHeader>
<detail>
<band height="19" splitType="Stretch">
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="d2773154-ce1e-4234-bfd3-c7230b1e1cbe" style="Detail" x="89" y="0" width="89" height="18">
<printWhenExpression><![CDATA[$F{tripName} != null;]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripName}]]></textFieldExpression>
</textField>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="a577c389-9b30-439e-bb16-119f8221c87d" style="Detail" x="178" y="0" width="100" height="18">
<printWhenExpression><![CDATA[$F{tripDate} != null;]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripDate}]]></textFieldExpression>
</textField>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="134f90c3-b3b3-4007-8040-c91db462be10" style="Detail" x="515" y="0" width="89" height="18">
<printWhenExpression><![CDATA[$F{tripFrom} != null;]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripFrom}]]></textFieldExpression>
</textField>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="b3648125-f342-4539-ac36-22cfa152c92d" style="Detail" x="603" y="0" width="100" height="18">
<printWhenExpression><![CDATA[$F{tripTo} != null;]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripTo}]]></textFieldExpression>
</textField>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="536f9148-1de2-428b-aa8a-9bdb4488cba3" style="Detail" x="702" y="0" width="89" height="18">
<printWhenExpression><![CDATA[$F{tripDelay} != null]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripDelay}]]></textFieldExpression>
</textField>
<textField pattern="dd MMM yy HH:mm" isBlankWhenNull="true">
<reportElement uuid="b138c7d9-c31c-4c9d-b004-d343ac194448" style="Detail" x="277" y="0" width="239" height="18">
<printWhenExpression><![CDATA[$F{tripFrom} != null;]]></printWhenExpression>
</reportElement>
<textElement/>
<textFieldExpression><![CDATA[$F{tripOperator}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="24" splitType="Stretch">
<frame>
<reportElement uuid="e73fa5db-7501-44f9-b061-ba0179add4cd" mode="Opaque" x="0" y="0" width="802" height="24" forecolor="#D0B48E" backcolor="#F2EBDF"/>
<textField evaluationTime="Report">
<reportElement uuid="d32aa440-7736-464d-b9ca-4b5ff2c86929" style="Field Label" x="762" y="0" width="40" height="24" forecolor="#736343"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="590794dc-150e-4555-941c-6e9742bc4fd2" style="Field Label" x="682" y="0" width="80" height="24" forecolor="#736343"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement uuid="4ab75820-1c6a-49de-b76c-272860dc4f7c" style="Field Label" x="0" y="0" width="197" height="24" forecolor="#736343"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
<paragraph leftIndent="10"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<image hAlign="Center">
<reportElement uuid="8dd54fe0-9404-400c-879f-8e5b56d9d839" x="355" y="0" width="96" height="24"/>
<imageExpression><![CDATA["4tel_logo.png"]]></imageExpression>
</image>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
you are using $F{tripFrom} != null; -> ; is not allowed in groovy there is not such a usage
either remove semicolons from all your expressions and printwhenexpressions or
change your report Language from groovy to java
it worked for me

Rectangle borders are not displayed

I have a requirement where I need to display a section of data surrounded by borders, like this:
I have tried to do it with adding Rectangle component in the Background band. In the internal preview window and PDF preview it is displayed as above, but when I run it in the server or use HTML preview, the border disappears. I have also tried to insert the Rectangle component in the Detail band and using Frames instead of a Rectangle, surrounding the data, but with the same problem.
I am using iReport 5.0.1 with compatibility set to JasperReports 3.5.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="Payslip" pageWidth="1000" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="960" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<import value="org.joda.time.DateTime"/>
<style name="Headings" vAlign="Middle" lineSpacing="1_1_2" fontName="Arial" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="Data" isDefault="true" vAlign="Middle" lineSpacing="1_1_2" fontName="Arial" fontSize="11"/>
<parameter name="rptName" class="java.lang.String" isForPrompting="false"/>
<parameter name="company" class="java.lang.String"/>
<field name="empName" class="java.lang.String"/>
<field name="salaryMonthName" class="java.lang.String"/>
<field name="salaryMonthYear" class="java.lang.Integer"/>
<field name="employeeCode" class="java.lang.String"/>
<field name="designation" class="java.lang.String"/>
<field name="grade" class="java.lang.String"/>
<field name="location" class="java.lang.String"/>
<field name="department" class="java.lang.String"/>
<field name="branch" class="java.lang.String"/>
<field name="dateOfJoining" class="org.joda.time.DateTime"/>
<field name="pfNumber" class="java.lang.String"/>
<field name="panNumber" class="java.lang.String"/>
<field name="bankName" class="java.lang.String"/>
<field name="accountNumber" class="java.lang.String"/>
<field name="workingDays" class="java.lang.Double"/>
<field name="paidDays" class="java.lang.Double"/>
<field name="absentDays" class="java.lang.Double"/>
<background>
<band height="301">
<rectangle>
<reportElement mode="Transparent" x="0" y="120" width="324" height="165"/>
<graphicElement>
<pen lineWidth="2.0"/>
</graphicElement>
</rectangle>
<rectangle>
<reportElement mode="Transparent" x="324" y="120" width="320" height="165"/>
<graphicElement>
<pen lineWidth="2.0"/>
</graphicElement>
</rectangle>
</band>
</background>
<title>
<band height="102">
<line>
<reportElement x="0" y="43" width="265" height="1" forecolor="#3333FF"/>
<graphicElement>
<pen lineWidth="3.0"/>
</graphicElement>
</line>
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="405" height="32" forecolor="#3333FF"/>
<textElement lineSpacing="Single">
<font size="16" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{company}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="44" width="200" height="31" forecolor="#3333FF"/>
<textElement lineSpacing="Single">
<font fontName="Arial" size="18"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{rptName}]]></textFieldExpression>
</textField>
<textField pattern="EEE, d MMM yyyy HH:mm">
<reportElement mode="Opaque" x="843" y="71" width="117" height="20" forecolor="#FFFFFF" backcolor="#999999"/>
<textElement lineSpacing="Single">
<font fontName="Arial"/>
</textElement>
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="92" y="82" width="129" height="20"/>
<textElement lineSpacing="Single">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{salaryMonthName} + " " + $F{salaryMonthYear}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="82" width="92" height="20"/>
<textElement lineSpacing="Single">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[For Month]]></text>
</staticText>
</band>
</title>
<detail>
<band height="205">
<staticText>
<reportElement style="Headings" x="12" y="23" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Code]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="43" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Name]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="63" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Designation]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="83" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Grade]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="103" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Location]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="123" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Department]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="143" width="91" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Branch]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="12" y="163" width="92" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Date of Joining]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="23" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[P. F. Number]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="43" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[PAN No.]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="63" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Pay Mode / Bank Name]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="83" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[A/C No.]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="103" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Working Days]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="123" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Paid Days]]></text>
</staticText>
<staticText>
<reportElement style="Headings" x="341" y="143" width="98" height="20"/>
<textElement lineSpacing="1_1_2"/>
<text><![CDATA[Absent Days]]></text>
</staticText>
<textField>
<reportElement x="154" y="23" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{employeeCode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="43" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{empName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="63" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{designation}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="83" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{grade}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="103" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{location}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="123" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{department}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="143" width="140" height="20"/>
<textElement lineSpacing="Single"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{branch}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="23" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{pfNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="43" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{panNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="63" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{bankName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="83" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{accountNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="103" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.Double"><![CDATA[$F{workingDays}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="123" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.Double"><![CDATA[$F{paidDays}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="492" y="143" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.Double"><![CDATA[$F{absentDays}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="154" y="163" width="140" height="20"/>
<textElement lineSpacing="1_1_2"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{dateOfJoining}.toString("dd-MMM-yyyy")]]></textFieldExpression>
</textField>
<break>
<reportElement x="0" y="184" width="960" height="1"/>
</break>
</band>
</detail>
</jasperReport>
The problem that you are having may be due to the fact that you cannot have objects overlapping in HTML. I have had this issue with Jasper before. If two objects (or more) overlap, only one of them will show on the report.
You could try using separate lines that do not overlap any of the other objects.
I have had trouble getting that to work so the way I have dealt with the situation in cases like yours is to use the borders of the text fields to make up the rectangles. For the top left label (Code), you can use it's top and left borders. For the middle labels, the left border. And for the bottom field (Date of Joining), the bottom and left borders. Then the opposite for the text fields. Then you can use padding on your text fields to make them look right. Sometimes I have a padding of 20 or more to get the effect I'm looking for.
I hope this helps.