title: How to prevent repetition of data display in report?
body: <h2>Sample Report - Design</h2>
  
  <p><img src="https://i.stack.imgur.com/2Ff5c.png" alt="My Sample Report - Design"></p>
  
  <h2>Sample Report - Preview</h2>
  
  <p><img src="https://i.stack.imgur.com/4Rq8s.png" alt="enter image description here"></p>
  
  <h2>XML Code File</h2>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&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="report2" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="82a3ce80-bdcd-4d51-8f21-e72b3f438b53"&gt;
      &lt;style name="table"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen 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;/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;/box&gt;
          &lt;conditionalStyle&gt;
              &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
              &lt;style backcolor="#EFF7FF"/&gt;
          &lt;/conditionalStyle&gt;
      &lt;/style&gt;
      &lt;style name="table 1"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
          &lt;conditionalStyle&gt;
              &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
              &lt;style backcolor="#EFF7FF"/&gt;
          &lt;/conditionalStyle&gt;
      &lt;/style&gt;
      &lt;subDataset name="dataset1" uuid="70653a81-8d48-4edd-b72f-20f769f51aea"&gt;
          &lt;queryString language="SQL"&gt;
              &lt;![CDATA[SELECT
       schooldetails.`ID` AS schooldetails_ID,
       schooldetails.`Name` AS schooldetails_Name,
       schooldetails.`Boardtype` AS schooldetails_Boardtype,
       schooldetails.`Location` AS schooldetails_Location,
       schooldetails.`Phone` AS schooldetails_Phone,
       schooldetails.`Address` AS schooldetails_Address,
       schooldetails.`Additionaldetails` AS schooldetails_Additionaldetails
  FROM
       `schooldetails` schooldetails]]&gt;
          &lt;/queryString&gt;
          &lt;field name="schooldetails_ID" class="java.lang.Integer"/&gt;
          &lt;field name="schooldetails_Name" class="java.lang.String"/&gt;
          &lt;field name="schooldetails_Boardtype" class="java.lang.String"/&gt;
          &lt;field name="schooldetails_Phone" class="java.lang.String"/&gt;
      &lt;/subDataset&gt;
      &lt;queryString&gt;
          &lt;![CDATA[SELECT
       schooldetails.`ID` AS schooldetails_ID,
       schooldetails.`Name` AS schooldetails_Name,
       schooldetails.`Boardtype` AS schooldetails_Boardtype,
       schooldetails.`Location` AS schooldetails_Location,
       schooldetails.`Phone` AS schooldetails_Phone,
       schooldetails.`Address` AS schooldetails_Address,
       schooldetails.`Additionaldetails` AS schooldetails_Additionaldetails
  FROM
       `schooldetails` schooldetails]]&gt;
      &lt;/queryString&gt;
      &lt;field name="schooldetails_ID" class="java.lang.Integer"/&gt;
      &lt;field name="schooldetails_Name" class="java.lang.String"/&gt;
      &lt;field name="schooldetails_Boardtype" class="java.lang.String"/&gt;
      &lt;field name="schooldetails_Location" class="java.lang.String"/&gt;
      &lt;field name="schooldetails_Phone" class="java.lang.String"/&gt;
      &lt;field name="schooldetails_Address" class="java.lang.String"/&gt;
      &lt;field name="schooldetails_Additionaldetails" class="java.lang.String"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="79" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="e15d9fdb-5a73-421d-8059-3e6d84742a43" x="0" y="0" width="555" height="79"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="24" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Sample report 2]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;detail&gt;
          &lt;band height="114"&gt;
              &lt;componentElement&gt;
                  &lt;reportElement uuid="0752ad71-0544-4a92-bc06-666619eada15" key="table 1" style="table 1" x="0" y="0" width="360" height="50"/&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="46c3a1a8-1e2b-4ea0-b7ac-5b630657c146"&gt;
                          &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:column width="99" uuid="b4badcbe-8219-4fcf-978c-b5ff6f2057d0"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement uuid="09f0cb22-b9b2-499a-9e94-0d9edb96e5f8" x="0" y="0" width="99" height="30"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="14" isBold="true"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;text&gt;&lt;![CDATA[School ID]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement uuid="0be272c3-3345-48fd-b90a-a0d0df3bc909" x="0" y="0" width="99" height="20"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="12"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{schooldetails_ID}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="160" uuid="1f036ef4-d3e4-4113-9084-5530b1e3e8d2"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement uuid="9ef54b86-c6ac-4f0b-8904-ff82ace55d7c" x="0" y="0" width="160" height="30"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="14" isBold="true"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;text&gt;&lt;![CDATA[Name]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement uuid="6c01ebc8-165d-41da-b632-8b19b67770ac" x="0" y="0" width="160" height="20"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="12"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{schooldetails_Name}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="114" uuid="7561e583-3af8-4799-ac88-2a7e8c164bfa"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement uuid="c500ce42-e32d-4704-9832-52d7413926e3" x="0" y="0" width="114" height="30"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="14" isBold="true"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;text&gt;&lt;![CDATA[Board]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement uuid="da078d0e-c6fb-4a3d-a0ed-ea12265cf729" x="0" y="0" width="114" height="20"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="12"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{schooldetails_Boardtype}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="131" uuid="7842fd3f-e097-4acd-a1ab-a09c0361c23b"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement uuid="c0519344-d25a-4ed9-8970-1acf9e4857ed" x="0" y="0" width="131" height="30"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="14" isBold="true"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;text&gt;&lt;![CDATA[Phone]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement uuid="560916c9-e02a-40c9-a7af-a63d285b900a" x="0" y="0" width="131" height="20"/&gt;
                                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                      &lt;font size="12"/&gt;
                                  &lt;/textElement&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{schooldetails_Phone}]]&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;/jasperReport&gt;
  </code></pre>
  
  <h2>My Question</h2>
  
  <p>How can i avoid repetition of table display twice? I want the data 
  to be displayed only one time.</p>
  
  <p>As you see in the above screen shots, I don't want the data to be 
  displayed twice.</p>