title: How to introduce the page break after pre-defined number of rows in the jr:table component?
body: <p>I am using jasper report version 6.1 and wanted page break after pre-defined number of rows in the <code>jr:table</code> component. I have also tried doing the same in version 5 and it works fine but in version 6+ I am not able to do it.</p>
  
  <p>Sharing the links which I followed if any one have other solution please let me know.</p>
  
  <p><a href="http://community.jaspersoft.com/wiki/ireport-how-introduce-page-break-after-pre-defined-number-rows-table-component" rel="nofollow noreferrer">http://community.jaspersoft.com/wiki/ireport-how-introduce-page-break-after-pre-defined-number-rows-table-component</a></p>
  
  <p><a href="http://community.jaspersoft.com/questions/845487/inserting-break-table-print-only-10-rows-page-jasper-reports-372" rel="nofollow noreferrer">http://community.jaspersoft.com/questions/845487/inserting-break-table-print-only-10-rows-page-jasper-reports-372</a></p>
  
  <p>This is what I have tried:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  --&gt;
  &lt;!-- 2017-05-29T15:29:33 --&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="Blank_A4_4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="957c1fea-8994-4195-9d7a-2bbf0baf7180"&gt;
      &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="Max apex"/&gt;
      &lt;style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="Table_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;topPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;leftPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;bottomPen lineWidth="0.5" lineColor="#000000"/&gt;
              &lt;rightPen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;subDataset name="Dataset1" uuid="435d51b0-6d3e-442e-9a96-ae7412b12278"&gt;
          &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="Max apex"/&gt;
          &lt;queryString&gt;
              &lt;![CDATA[select * from dept]]&gt;
          &lt;/queryString&gt;
          &lt;field name="DEPTNO" class="java.math.BigDecimal"/&gt;
          &lt;field name="DNAME" class="java.lang.String"/&gt;
          &lt;field name="LOC" class="java.lang.String"/&gt;
          &lt;group name="DEPTNO"&gt;
              &lt;groupExpression&gt;&lt;![CDATA[$F{DEPTNO}]]&gt;&lt;/groupExpression&gt;
          &lt;/group&gt;
          &lt;group name="DNAME"&gt;
              &lt;groupExpression&gt;&lt;![CDATA[$F{DNAME}]]&gt;&lt;/groupExpression&gt;
          &lt;/group&gt;
          &lt;group name="LOC"&gt;
              &lt;groupExpression&gt;&lt;![CDATA[$F{LOC}]]&gt;&lt;/groupExpression&gt;
          &lt;/group&gt;
      &lt;/subDataset&gt;
      &lt;queryString&gt;
          &lt;![CDATA[select * from dept]]&gt;
      &lt;/queryString&gt;
      &lt;field name="DEPTNO" class="java.math.BigDecimal"/&gt;
      &lt;field name="DNAME" class="java.lang.String"/&gt;
      &lt;field name="LOC" class="java.lang.String"/&gt;
      &lt;group name="DEPTNO"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{DEPTNO}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&gt;
      &lt;group name="DNAME"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{DNAME}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&gt;
      &lt;group name="LOC"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{LOC}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="79" splitType="Stretch"/&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="35" splitType="Stretch"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"/&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="145" splitType="Stretch"&gt;
              &lt;componentElement&gt;
                  &lt;reportElement positionType="FixRelativeToBottom" x="10" y="0" width="500" height="110" uuid="b37c89ae-600a-4fb8-ac64-e142bfe22e13"/&gt;
                  &lt;jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"&gt;
                      &lt;datasetRun subDataset="Dataset1" uuid="8f84378b-9508-4763-8265-69e68c41febe"&gt;
                          &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:column width="100" uuid="00a00921-f5fa-4352-924c-f0531c919f71"&gt;
                          &lt;jr:columnHeader style="Table_CH" height="30"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="100" height="30" uuid="d88580f8-05d2-4eb0-a098-00e877c58c39"/&gt;
                                  &lt;text&gt;&lt;![CDATA[DEPTNO]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="Table_TD" height="30"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30" uuid="15fda94a-b686-4808-b55c-3e08a8e86187"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{DEPTNO}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="140" uuid="72e58aec-00f1-4937-8600-b32a6010d4d6"&gt;
                          &lt;jr:columnHeader style="Table_CH" height="30"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="130" height="30" uuid="942c89ca-e914-4809-bb18-3b7065b413f7"/&gt;
                                  &lt;text&gt;&lt;![CDATA[DNAME]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="Table_TD" height="30"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="130" height="30" uuid="8b936e63-5f84-4fd7-b21c-8c08fb9550a5"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{DNAME}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="140" uuid="f312cbac-4554-492c-928f-dd84b5a55d42"&gt;
                          &lt;jr:columnHeader style="Table_CH" height="30"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="120" height="30" uuid="ce385917-88aa-4e51-9cae-a7a142f78323"/&gt;
                                  &lt;text&gt;&lt;![CDATA[LOC]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="Table_TD" height="30"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="120" height="30" uuid="0e43f425-558c-4001-9c44-ca14798bcb75"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{LOC}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                  &lt;/jr:table&gt;
              &lt;/componentElement&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height="45" splitType="Stretch"/&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height="54" splitType="Stretch"/&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height="42" splitType="Stretch"/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>