title: Avoid Repeating Column Header in Table
body: <p>I am a newbie to <em>JasperReports</em>. When I try to add values to table in the columns the column header and footer are getting repeated. How should I group column header. </p>
  
  <p>My <em>jrxml</em>:</p>
  
  <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="report1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="551344a1-61b0-419c-92a0-5ebe6f8d4219"&gt;
      &lt;property name="ireport.zoom" value="1.2100000000000004"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&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;/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;/style&gt;
      &lt;style name="table 2"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 2_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 2_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 2_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;subDataset name="Table Dataset 1" uuid="75c6059a-1e76-45b2-a87c-14792e68956e"&gt;
          &lt;field name="training" class="java.lang.String"/&gt;
          &lt;field name="trainingPeriod" class="java.lang.String"/&gt;
          &lt;field name="traingingAdd" class="java.lang.String"/&gt;
          &lt;field name="noofgovtorderauth" class="java.lang.String"/&gt;
          &lt;field name="authapprovingentry" class="java.lang.String"/&gt;
          &lt;field name="deptTestpassed" class="java.lang.String"/&gt;
          &lt;field name="athConducTest" class="java.lang.String"/&gt;
          &lt;field name="monthSptestPassed" class="java.lang.String"/&gt;
          &lt;field name="yrSpTestPassed" class="java.lang.String"/&gt;
          &lt;field name="regNo" class="java.lang.String"/&gt;
      &lt;/subDataset&gt;
      &lt;parameter name="ReportName" class="java.lang.String"/&gt;
      &lt;parameter name="Date" class="java.lang.String"/&gt;
      &lt;parameter name="Title" class="java.lang.String"/&gt;
      &lt;parameter name="SubTitle" class="java.lang.String"/&gt;
      &lt;parameter name="FooterDetail" class="java.lang.String"/&gt;
      &lt;parameter name="govtlogo" class="java.lang.String"/&gt;
      &lt;parameter name="TNWRDLogo" class="java.lang.String"/&gt;
      &lt;field name="training" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[training]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;field name="trainingPeriod" class="java.lang.String"/&gt;
      &lt;field name="traingingAdd" class="java.lang.String"/&gt;
      &lt;field name="noofgovtorderauth" class="java.lang.String"/&gt;
      &lt;field name="authapprovingentry" class="java.lang.String"/&gt;
      &lt;field name="deptTestpassed" class="java.lang.String"/&gt;
      &lt;field name="athConducTest" class="java.lang.String"/&gt;
      &lt;field name="monthSptestPassed" class="java.lang.String"/&gt;
      &lt;field name="yrSpTestPassed" class="java.lang.String"/&gt;
      &lt;field name="regNo" 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;frame&gt;
                  &lt;reportElement uuid="fd5eaed7-88e8-4980-8205-6e50cf99ef20" x="0" y="27" width="565" height="52"&gt;
                      &lt;property name="net.sf.jasperreports.export.pdf.tag.h1"/&gt;
                      &lt;property name="net.sf.jasperreports.export.pdf.tag.tr" value="full"/&gt;
                      &lt;property name="net.sf.jasperreports.export.pdf.tag.th" value="full"/&gt;
                      &lt;property name="net.sf.jasperreports.export.pdf.tag.td" value="full"/&gt;
                  &lt;/reportElement&gt;
                  &lt;box&gt;
                      &lt;pen lineWidth="0.25"/&gt;
                      &lt;topPen lineWidth="0.25"/&gt;
                      &lt;leftPen lineWidth="0.25"/&gt;
                      &lt;bottomPen lineWidth="0.25"/&gt;
                      &lt;rightPen lineWidth="0.25"/&gt;
                  &lt;/box&gt;
                  &lt;textField&gt;
                      &lt;reportElement uuid="d3615141-0461-4665-b5f4-46a10f968d0e" x="174" y="33" width="213" height="19"/&gt;
                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                          &lt;font size="8" isBold="true"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$P{SubTitle}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;image&gt;
                      &lt;reportElement uuid="34b5159e-3eb2-450a-9536-f79813589d48" x="442" y="2" width="61" height="48"/&gt;
                      &lt;imageExpression&gt;&lt;![CDATA[$P{TNWRDLogo}]]&gt;&lt;/imageExpression&gt;
                  &lt;/image&gt;
                  &lt;image&gt;
                      &lt;reportElement uuid="cd0f7d86-105f-44a1-8c27-81feacfba469" x="65" y="0" width="98" height="51"/&gt;
                      &lt;imageExpression&gt;&lt;![CDATA[$P{govtlogo}]]&gt;&lt;/imageExpression&gt;
                  &lt;/image&gt;
                  &lt;textField&gt;
                      &lt;reportElement uuid="e8aee322-2336-4637-9a5c-cb51af5995c8" x="174" y="0" width="213" height="32"/&gt;
                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                          &lt;font size="14" isBold="true"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$P{Title}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
              &lt;/frame&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="35" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement uuid="4c89127c-2b66-447e-af83-7ffd210e8a19" x="174" y="5" width="213" height="24"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="9" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{ReportName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;frame&gt;
                  &lt;reportElement uuid="4ba70858-74c9-48a0-9690-888636570607" x="0" y="0" width="565" height="35"/&gt;
                  &lt;box&gt;
                      &lt;pen lineWidth="0.25"/&gt;
                      &lt;topPen lineWidth="0.25"/&gt;
                      &lt;leftPen lineWidth="0.25"/&gt;
                      &lt;bottomPen lineWidth="0.25"/&gt;
                      &lt;rightPen lineWidth="0.25"/&gt;
                  &lt;/box&gt;
              &lt;/frame&gt;
          &lt;/band&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="23" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="479cad61-a5be-4318-8e81-850ba6626e59" x="27" y="0" width="100" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Training Detail]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="d3474389-b724-4579-81b6-2f5c806aaa25" x="432" y="0" width="100" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Special Tests Passed]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="125" splitType="Stretch"&gt;
              &lt;componentElement&gt;
                  &lt;reportElement uuid="f2abf631-2415-4ba1-bf93-4b1d458dacbc" key="table 2" style="table 2" x="53" y="44" width="450" 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="Table Dataset 1" uuid="69dfdbc6-34fc-48ee-8ecd-197cde9b11fb"&gt;
                          &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]&gt;&lt;/dataSourceExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:columnGroup width="450" uuid="7287994d-bc5c-4286-8607-29969a2eb9ef"&gt;
                          &lt;jr:column width="90" uuid="dbd24c78-fb82-47c4-9342-d5a73fb7e000"&gt;
                              &lt;jr:columnHeader style="table 2_CH" height="29" rowSpan="1"&gt;
                                  &lt;staticText&gt;
                                      &lt;reportElement uuid="74b27263-d281-4136-b674-12bd3a74bd3c" x="0" y="0" width="90" height="29"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                          &lt;font isBold="true"/&gt;
                                      &lt;/textElement&gt;
                                      &lt;text&gt;&lt;![CDATA[Training]]&gt;&lt;/text&gt;
                                  &lt;/staticText&gt;
                              &lt;/jr:columnHeader&gt;
                              &lt;jr:detailCell style="table 2_TD" height="30" rowSpan="1"&gt;
                                  &lt;textField&gt;
                                      &lt;reportElement uuid="be34b5c1-5cd4-43e3-b6f9-0e6f2bbf88db" x="0" y="0" width="90" height="30"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
                                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{training}]]&gt;&lt;/textFieldExpression&gt;
                                  &lt;/textField&gt;
                              &lt;/jr:detailCell&gt;
                          &lt;/jr:column&gt;
                          &lt;jr:column width="90" uuid="01a9c90b-46c3-4693-b186-7abc77256f73"&gt;
                              &lt;jr:columnHeader style="table 2_CH" height="29" rowSpan="1"&gt;
                                  &lt;staticText&gt;
                                      &lt;reportElement uuid="5ada3627-2084-4d79-a923-b6acbeee8058" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="90" height="29"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                          &lt;font isBold="true"/&gt;
                                      &lt;/textElement&gt;
                                      &lt;text&gt;&lt;![CDATA[Period / Duration]]&gt;&lt;/text&gt;
                                  &lt;/staticText&gt;
                              &lt;/jr:columnHeader&gt;
                              &lt;jr:detailCell style="table 2_TD" height="30" rowSpan="1"&gt;
                                  &lt;textField&gt;
                                      &lt;reportElement uuid="abb64036-38ea-4560-84fd-09dde730c3bc" x="0" y="0" width="90" height="30"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
                                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{trainingPeriod}]]&gt;&lt;/textFieldExpression&gt;
                                  &lt;/textField&gt;
                              &lt;/jr:detailCell&gt;
                          &lt;/jr:column&gt;
                          &lt;jr:column width="90" uuid="0865e4a3-5dbe-430a-9c50-90a636ef49ef"&gt;
                              &lt;jr:columnHeader style="table 2_CH" height="29" rowSpan="1"&gt;
                                  &lt;staticText&gt;
                                      &lt;reportElement uuid="a897110e-f09f-43f3-a53b-aa8450065832" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="90" height="29"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                          &lt;font isBold="true"/&gt;
                                      &lt;/textElement&gt;
                                      &lt;text&gt;&lt;![CDATA[Impart Training Address]]&gt;&lt;/text&gt;
                                  &lt;/staticText&gt;
                              &lt;/jr:columnHeader&gt;
                              &lt;jr:detailCell style="table 2_TD" height="30" rowSpan="1"&gt;
                                  &lt;textField&gt;
                                      &lt;reportElement uuid="41f45483-1f6d-480c-a59c-96093111ace5" x="0" y="0" width="90" height="30"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
                                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{traingingAdd}]]&gt;&lt;/textFieldExpression&gt;
                                  &lt;/textField&gt;
                              &lt;/jr:detailCell&gt;
                          &lt;/jr:column&gt;
                          &lt;jr:column width="90" uuid="8949efe8-7041-49dd-8631-685e8568e6d5"&gt;
                              &lt;jr:columnHeader style="table 2_CH" height="29" rowSpan="1"&gt;
                                  &lt;staticText&gt;
                                      &lt;reportElement uuid="643bb124-0b66-448d-ade8-c7b540f18eb5" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="90" height="29"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                          &lt;font isBold="true"/&gt;
                                      &lt;/textElement&gt;
                                      &lt;text&gt;&lt;![CDATA[No of Government Orders]]&gt;&lt;/text&gt;
                                  &lt;/staticText&gt;
                              &lt;/jr:columnHeader&gt;
                              &lt;jr:detailCell style="table 2_TD" height="30" rowSpan="1"&gt;
                                  &lt;textField&gt;
                                      &lt;reportElement uuid="834227d7-673a-4335-b1f8-37b3892125b1" x="0" y="0" width="90" height="30"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
                                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{noofgovtorderauth}]]&gt;&lt;/textFieldExpression&gt;
                                  &lt;/textField&gt;
                              &lt;/jr:detailCell&gt;
                          &lt;/jr:column&gt;
                          &lt;jr:column width="90" uuid="7fa15b45-3110-4648-ab41-35fc77c625d6"&gt;
                              &lt;jr:columnHeader style="table 2_CH" height="29" rowSpan="1"&gt;
                                  &lt;staticText&gt;
                                      &lt;reportElement uuid="cfd20c24-75f4-449e-83ae-38d9e0507728" x="0" y="0" width="90" height="29"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                                          &lt;font isBold="true"/&gt;
                                      &lt;/textElement&gt;
                                      &lt;text&gt;&lt;![CDATA[ Approving Audthority]]&gt;&lt;/text&gt;
                                  &lt;/staticText&gt;
                              &lt;/jr:columnHeader&gt;
                              &lt;jr:detailCell style="table 2_TD" height="30" rowSpan="1"&gt;
                                  &lt;textField&gt;
                                      &lt;reportElement uuid="b5e5dec0-46d3-47b5-aefe-5fe2038c94b9" x="0" y="0" width="90" height="30"/&gt;
                                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
                                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{authapprovingentry}]]&gt;&lt;/textFieldExpression&gt;
                                  &lt;/textField&gt;
                              &lt;/jr:detailCell&gt;
                          &lt;/jr:column&gt;
                      &lt;/jr:columnGroup&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>