title: How to avoid space in between when components are dynamically not visible in jasper reports?
body: <p>I've some 11 staticText components here. when I display only first and eight components I see a huge gap between them. I don't have any space between each component. 
  My assumption is 'isRemoveLineWhenBlank="true"' on a component will allow the next component to display in its place if it's not getting displayed. But that's not happening here.</p>
  
  <p>Below is the jasper reports version used:</p>
  
  <pre><code>&lt;dependency&gt;
       &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
       &lt;artifactId&gt;jasperreports-fonts&lt;/artifactId&gt;
       &lt;version&gt;6.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Below is the code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  --&gt;
  &lt;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="sample" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="acaa0a15-dc0f-462c-8d16-14f0b7325696"&gt;
      &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/&gt;
      &lt;summary&gt;
          &lt;band height="581" splitType="Prevent"&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="19" width="381" height="41" isRemoveLineWhenBlank="true" uuid="9547d877-993c-4bb4-becc-cf70a0cc1bc2"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[true]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[Text11111111111111111111]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="60" width="381" height="41" isRemoveLineWhenBlank="true" uuid="9e7dbe2e-2fed-41c8-82ce-c0c6886c8eda"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[Text22222222222222222]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="100" width="381" height="41" isRemoveLineWhenBlank="true" uuid="75d03d01-ae6f-40e3-92d4-bed93a7cf671"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[Text3333333333333]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="260" width="381" height="41" isRemoveLineWhenBlank="true" uuid="d351c771-3c5f-4318-9a47-9363831908b6"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[7777777777777777777]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="140" width="381" height="41" isRemoveLineWhenBlank="true" uuid="cfa2937f-8ddd-4608-95e5-f3ec1d0dbea2"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[4444444444444444444]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="180" width="381" height="41" isRemoveLineWhenBlank="true" uuid="9e69343a-e1e7-4af9-90ae-d5d7c128a30a"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[55555555555555555555555]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="220" width="381" height="41" isRemoveLineWhenBlank="true" uuid="63d16d03-d637-406c-b128-06e8741a927f"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[66666666666666666]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="300" width="381" height="41" isRemoveLineWhenBlank="true" uuid="2f7e0222-a2be-47ff-be3c-3d404c40ab1c"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[true]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[888888888888888888]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="340" width="381" height="41" isRemoveLineWhenBlank="true" uuid="d87a01b5-f041-4c41-83e9-57b2e350f5b2"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[999999999999999999999999]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="380" width="381" height="41" isRemoveLineWhenBlank="true" uuid="b2017166-a731-4ebf-86f9-42a9dfe9d95a"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[1010101010101010]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="0" y="420" width="381" height="41" isRemoveLineWhenBlank="true" uuid="65c6b70e-7e12-4d38-b9d3-b9456e77c1e7"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[false]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;text&gt;&lt;![CDATA[11 11 11 11 11 11 11 11 11 11 11 ]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Here is the screenshot of the gap showing:</p>
  
  <p><a href="https://i.stack.imgur.com/1noal.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1noal.png" alt="enter image description here"></a></p>
  
  <p>The output is same for splitType "Prevent", "Immediate" and "Stretch". Please help.</p>