ashoksharma2621 Posted February 25, 2010 Share Posted February 25, 2010 HiI have three textfield one above the other. I want the textfield 3 move upwards if textfield2 is null or blank. but it is not happening.I have gone through the forums and followed that Remove line when blank should be checked and textfield 3 should be float. I tried all this but no luck. I am really getting frustrated with this. Here is the xml ..Please advice what needs to be done. <?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="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <subDataset name="dataset1"/> <parameter name="addressLine1" class="java.lang.String"/> <parameter name="addressLine2" class="java.lang.String"/> <parameter name="state" class="java.lang.String"/> <field name="field" class="java.lang.String"/> <field name="addressLine1" class="java.lang.String"/> <field name="addressLine2" class="java.lang.String"/> <field name="state" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="117" splitType="Stretch"> <elementGroup> <textField isStretchWithOverflow="true" evaluationTime="Report" isBlankWhenNull="true"> <reportElement key="" positionType="Float" x="50" y="61" width="163" height="18"/> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"> <pen lineWidth="0.25" lineStyle="Solid"/> <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font fontName="Arial" size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{state}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" evaluationTime="Report" isBlankWhenNull="true"> <reportElement key="" positionType="Float" isPrintRepeatedValues="false" x="50" y="36" width="163" height="25" isRemoveLineWhenBlank="true"/> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"> <pen lineWidth="0.25" lineStyle="Solid"/> <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font fontName="Arial" size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{addressLine2}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="" positionType="Float" x="50" y="10" width="163" height="26"/> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"> <pen lineWidth="0.25" lineStyle="Solid"/> <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font fontName="Arial" size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{addressLine1}]]></textFieldExpression> </textField> </elementGroup> </band> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="126" splitType="Stretch"/> </columnHeader> <detail> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport> Prompt solution is highly appreciated.I tried printwhen expression as well but it does not omit the space between textfield 1 and textfield 3.Best RegardsAshok Link to comment Share on other sites More sharing options...
ashoksharma2621 Posted February 25, 2010 Author Share Posted February 25, 2010 Hi Please ignore it. I fixed it myself. cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now