title: iReport: How to hide line with text fields without data line contains different kind of data
body: <p>I have null textfields (it contains string or bigdecimal value) put on single line pulled for my report which display a blank line.</p>
  
  <p>In order to remove the blank line that has null rows I used the property <strong><em><code>isRemoveLineWhenBlank</code></em></strong> for the report elements in that line. But that does not work. </p>
  
  <p>Can someone help me with this please?</p>
  
  <p>snap:
  <img src="https://i.stack.imgur.com/IQOlr.png" alt="enter image description here"></p>
  
  <p>output snap:
  <img src="https://i.stack.imgur.com/F5aVp.png" alt="enter image description here"></p>
  
  <p>jrxml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"  ?&gt;
  &lt;!-- Created with iReport - A designer for JasperReports --&gt;
  &lt;!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"&gt;
  &lt;jasperReport
           name="WEB_PREVIEW"
           columnCount="1"
           printOrder="Horizontal"
           orientation="Portrait"
           pageWidth="595"
           pageHeight="900"
           columnWidth="535"
           columnSpacing="0"
           leftMargin="30"
           rightMargin="30"
           topMargin="20"
           bottomMargin="20"
           whenNoDataType="NoPages"
           isTitleNewPage="false"
           isSummaryNewPage="false"&gt;
      &lt;property name="ireport.scriptlethandling" value="0" /&gt;
      &lt;property name="ireport.encoding" value="UTF-8" /&gt;
      &lt;import value="java.util.*" /&gt;
      &lt;import value="net.sf.jasperreports.engine.*" /&gt;
      &lt;import value="net.sf.jasperreports.engine.data.*" /&gt;
  
      &lt;parameter name="GROSS_RENTAL_INCOME_SQPA_LABEL" isForPrompting="false" class="java.lang.String"/&gt;
      &lt;parameter name="GROSS_RENTAL_INCOME_SQPA" isForPrompting="false" class="java.math.BigDecimal"/&gt;
      &lt;defaultValueExpression &gt;&lt;![CDATA["C:\\Development_New\\Cyprus\\Cyprus\\WebRoot\\report\\"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;background&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/background&gt;
          &lt;title&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/title&gt;
          &lt;pageHeader&gt;
              &lt;band height="32"  isSplitAllowed="true" &gt;
                  &lt;textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" &gt;
                      &lt;reportElement
                          x="367"
                          y="105"
                          width="96"
                          height="12"
                          key="textField"
                          positionType="Float"
                          isRemoveLineWhenBlank="true"&gt;
                              &lt;printWhenExpression&gt;&lt;![CDATA[new Boolean($P{GROSS_RENTAL_INCOME_SQPA}!=null)]]&gt;&lt;/printWhenExpression&gt;
                          &lt;/reportElement&gt;
                      &lt;box&gt;&lt;/box&gt;
                      &lt;textElement&gt;
                          &lt;font pdfFontName="Helvetica-Bold" size="8" isBold="true"/&gt;
                      &lt;/textElement&gt;
                  &lt;textFieldExpression   class="java.lang.String"&gt;&lt;![CDATA[$P{GROSS_RENTAL_INCOME_SQPA_LABEL}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true" pattern="###,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" &gt;
                      &lt;reportElement
                          x="472"
                          y="105"
                          width="48"
                          height="12"
                          key="textField"
                          positionType="Float"
                          isRemoveLineWhenBlank="true"&gt;
                              &lt;printWhenExpression&gt;&lt;![CDATA[new Boolean($P{GROSS_RENTAL_INCOME_SQPA}!=null)]]&gt;&lt;/printWhenExpression&gt;
                          &lt;/reportElement&gt;
                      &lt;box&gt;&lt;/box&gt;
                      &lt;textElement&gt;
                          &lt;font size="8"/&gt;
                      &lt;/textElement&gt;
                  &lt;textFieldExpression   class="java.math.BigDecimal"&gt;&lt;![CDATA[$P{GROSS_RENTAL_INCOME_SQPA}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;/band&gt;
          &lt;/detail&gt;
          &lt;columnFooter&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/columnFooter&gt;
          &lt;pageFooter&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/pageFooter&gt;
          &lt;summary&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>