title: how to prevent long text from being truncated on next subsequent page in Jasper Report
body: <p>I have a very long static test. in my main jrxml (detail band), i created a sub-report to print this long static text. The output format is PDF. The long text is printed until the end of page, and then continue to next page. However, there some wording that had been left out / truncated in the next page.</p>
  
  <p>ex. here is a very long long long static1 text long static2 text static3 static4</p>
  
  <p>PDF output, page 1, it printed ("here is a very long long long static1"). But in page 2, it continue printed start with ("static3 static4"). few words are missing/truncated</p>
  
  <p>This is the main jrxml. it has a frame defined. and inside this frame, will have subreport defined.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;frame&gt;                   
  &lt;reportElement
      x="18"
      y="472"
      width="819"
      height="198"
      key="frame-4"
      positionType="Float"/&gt;
  &lt;box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/&gt;
   
   
   
  &lt;subreport  isUsingCache="true"&gt;
      &lt;reportElement
          mode="Transparent"
          x="3"
          y="31"
          width="350"
          height="12"
          key="subreport-21"
          positionType="Float"
          isRemoveLineWhenBlank="true"
          isPrintInFirstWholeBand="true"/&gt;
      &lt;dataSourceExpression&gt;&lt;![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/PrintOrders/StructuredNote[NoteID='ST']")]]&gt;&lt;/dataSourceExpression&gt;
      &lt;subreportExpression  class="java.lang.String"&gt;&lt;![CDATA["/print/FullPrint.jasper"]]&gt;&lt;/subreportExpression&gt;
  &lt;/subreport&gt;
   
   
  &lt;/frame&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is the sub-report jrxml</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><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="FullPrint"
           columnCount="1"
           printOrder="Vertical"
           orientation="Landscape"
           pageWidth="842"
           pageHeight="595"
           columnWidth="842"
           columnSpacing="0"
           leftMargin="0"
           rightMargin="0"
           topMargin="0"
           bottomMargin="0"
           whenNoDataType="NoPages"
           scriptletClass="JasperUtil"
           isTitleNewPage="false"
           isSummaryNewPage="false"
           resourceBundle="AllBundles"&gt;
      &lt;property name="ireport.scriptlethandling" value="2" /&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="SUBREPORT_DIR" isForPrompting="true" class="java.lang.String"&gt;
          &lt;defaultValueExpression &gt;&lt;![CDATA[".\\"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;queryString language="xPath"&gt;&lt;![CDATA[PrintOrders/PrintOrder/PurchaseOrder]]&gt;&lt;/queryString&gt;
   
      &lt;field name="BLBST" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[./GeneralNote]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;field name="PoNumber" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[./PoHeader/PoNumber]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
   
      &lt;sortField name="BLBScheduleId" /&gt;
   
   
          &lt;group  name="PurchaseOrder" isReprintHeaderOnEachPage="true" &gt;
              &lt;groupExpression&gt;&lt;![CDATA[$F{PoNumber}]]&gt;&lt;/groupExpression&gt;
              &lt;groupHeader&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
              &lt;/groupHeader&gt;
              &lt;groupFooter&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
              &lt;/groupFooter&gt;
          &lt;/group&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="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/pageHeader&gt;
          &lt;columnHeader&gt;
              &lt;band height="0"  isSplitAllowed="true" &gt;
              &lt;/band&gt;
          &lt;/columnHeader&gt;
          &lt;detail&gt;
              &lt;band height="17"  isSplitAllowed="true" &gt;
                  &lt;textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" &gt;
                      &lt;reportElement
                          x="3"
                          y="2"
                          width="821"
                          height="13"
                          key="textField-279"
                          positionType="Float"
                          isRemoveLineWhenBlank="true"/&gt;
                      &lt;box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/&gt;
                      &lt;textElement&gt;
                          &lt;font pdfFontName="Helvetica" size="9" isBold="false"/&gt;
                      &lt;/textElement&gt;
                  &lt;textFieldExpression   class="java.lang.String"&gt;&lt;![CDATA[$P{REPORT_SCRIPTLET}.doReplaceStringWithNewlineChar($F{BLBST})]]&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>
  </div>
  </div>
  </p>
  
  <p>here is what i have done and which already set.</p>
  
  <ol>
  <li><p>for the text box of the subreport, set "Stretch with Overfow" = true and "position type" = Float</p></li>
  <li><p>for the sub-report element in the main jrxml, i set "Position type" = Float and "Stretch Type"=no</p></li>
  </ol>
  
  <p>I had try and error, lots of other config combination, for instance</p>
  
  <ul>
  <li>Position Type = Float</li>
  <li>Strech Type = Relative to tallest object or Relative to band height</li>
  <li>Stretch with overflow = true</li>
  </ul>
  
  <p>There other post in this forum, and i had tried most of them suggestion except for this below</p>
  
  <ul>
  <li>setting font name same as pdf font name. because there is no value in both drop down selection list, that had same value in both drop down list</li>
  </ul>
  
  <p>Here is the screen-cap. The top is the page 1, and there is a very long text which will then overflow to the next page. But, on the second page, the continuous sentence of text had been truncated.</p>
  
  <p><a href="https://i.stack.imgur.com/O31nW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O31nW.png" alt="enter image description here"></a></p>