title: Grouping in iReport tool
body: <p>I am using <b>iReport 5.1.0</b> tool for report designing.<br><br>
  My Current report output is like,</p>
  
  <pre><code>------------------------------------------------------------
  | STUDENT_ID | SUBJECT_NAME | SUBJECT_MARK | STUDENT_NAME |
  ------------------------------------------------------------
  |     1      |   Maths      |      25      |     John     |
  ------------------------------------------------------------
  |     1      |   English    |      35      |     John     |
  ------------------------------------------------------------
  |     2      |   Maths      |      30      |     James    |
  ------------------------------------------------------------
  |     2      |   English    |      23      |     James    |
  ------------------------------------------------------------</code></pre>
  
  <p>but I need something like,</p>
  
  <pre><code>------------------------------------------------------------
  | STUDENT_ID | SUBJECT_NAME | SUBJECT_MARK | STUDENT_NAME |
  ------------------------------------------------------------
  |     1      |   Maths      |      25      |     John     |
               -------------------------------
  |            |   English    |      35      |              |
  ------------------------------------------------------------
  |     2      |   Maths      |      30      |     James    |
               -------------------------------
  |            |   English    |      23      |              |
  ------------------------------------------------------------</code></pre>
  
  <p>And this is my <b>.jrxml</b> file.</p>
  
  <pre><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="testStudent" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="31359f99-5457-4827-9bdb-e1160fe03bdc"&gt;
  &lt;property name="ireport.zoom" value="1.0"/&gt;
  &lt;property name="ireport.x" value="0"/&gt;
  &lt;property name="ireport.y" value="0"/&gt;
  &lt;field name="studentId" class="java.lang.String"/&gt;
  &lt;field name="studentName" class="java.lang.String"/&gt;
  &lt;field name="subjectName" class="java.lang.String"/&gt;
  &lt;field name="subjectMark" class="java.lang.String"/&gt;
  &lt;background&gt;
      &lt;band splitType="Stretch"/&gt;
  &lt;/background&gt;
  &lt;title&gt;
      &lt;band height="31" splitType="Stretch"&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="c04d7e4f-68ce-4519-a96d-8c4ba4dd4bba" x="0" y="0" width="205" height="31"/&gt;
              &lt;textElement&gt;
                  &lt;font size="20" isBold="true"/&gt;
              &lt;/textElement&gt;
              &lt;text&gt;&lt;![CDATA[Test Students]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
      &lt;/band&gt;
  &lt;/title&gt;
  &lt;pageHeader&gt;
      &lt;band height="3" splitType="Stretch"/&gt;
  &lt;/pageHeader&gt;
  &lt;columnHeader&gt;
      &lt;band height="23" splitType="Stretch"&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="04cf5bc0-ff69-47e3-af7c-b2702b1d5e90" x="0" y="2" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;text&gt;&lt;![CDATA[STUDENT_ID]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="b3c3a500-fb03-459f-b600-8ef738b3a795" x="300" y="2" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;text&gt;&lt;![CDATA[STUDENT_NAME]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="04c057c8-e4cb-4ad9-876f-40ec3af568c4" x="100" y="2" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;text&gt;&lt;![CDATA[SUBJECT_NAME]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
          &lt;staticText&gt;
              &lt;reportElement uuid="3f78e926-ed9e-4306-b0d7-cc03243bef4b" x="200" y="2" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;text&gt;&lt;![CDATA[SUBJECT_MARK]]&gt;&lt;/text&gt;
          &lt;/staticText&gt;
      &lt;/band&gt;
  &lt;/columnHeader&gt;
  &lt;detail&gt;
      &lt;band height="21" splitType="Stretch"&gt;
          &lt;textField&gt;
              &lt;reportElement uuid="e15a2c2c-76f7-40bb-bb88-dde1f89ff2d5" x="0" y="0" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{studentId}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
          &lt;textField&gt;
              &lt;reportElement uuid="6da8fc6d-918b-4984-b374-57ab8669de80" x="300" y="0" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{studentName}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
          &lt;textField&gt;
              &lt;reportElement uuid="827a067f-e2a2-4a2e-a8f0-bf765e6ed241" x="100" y="0" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{subjectName}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
          &lt;textField&gt;
              &lt;reportElement uuid="23463a34-0af0-4897-8745-6fe477919a83" x="200" y="0" width="100" height="20"/&gt;
              &lt;box&gt;
                  &lt;pen lineWidth="1.0"/&gt;
                  &lt;topPen lineWidth="1.0"/&gt;
                  &lt;leftPen lineWidth="1.0"/&gt;
                  &lt;bottomPen lineWidth="1.0"/&gt;
                  &lt;rightPen lineWidth="1.0"/&gt;
              &lt;/box&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{subjectMark}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
      &lt;/band&gt;
  &lt;/detail&gt;
  &lt;columnFooter&gt;
      &lt;band height="4" splitType="Stretch"/&gt;
  &lt;/columnFooter&gt;
  &lt;pageFooter&gt;
      &lt;band height="5" splitType="Stretch"/&gt;
  &lt;/pageFooter&gt;
  &lt;summary&gt;
      &lt;band height="4" splitType="Stretch"/&gt;
  &lt;/summary&gt;&lt;/jasperReport&gt;
  </code></pre>
  
  <p>Can anybody help me? Thanks in advance.</p>