title: Chart repeats many times
body: <p>I have generated a report (with JasperReport). My problem that the chart repeats, I have one chart and the report contains 22 pages! What is the problem?</p>
  
  <p>This is my report:</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="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"&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;subDataset name="New Dataset 1"&gt;
      &lt;parameter name="SQL" class="java.lang.String"/&gt;
      &lt;parameter name="Titre" class="java.lang.String"&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA[]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;queryString&gt;
          &lt;![CDATA[$P!{SQL}]]&gt;
      &lt;/queryString&gt;
      &lt;field name="nb" class="java.lang.Long"/&gt;
      &lt;field name="champ1" class="java.lang.String"/&gt;
      &lt;field name="champ2" class="java.lang.String"/&gt;
  &lt;/subDataset&gt;
  &lt;parameter name="SQL" class="java.lang.String"&gt;
      &lt;defaultValueExpression&gt;&lt;![CDATA[]]&gt;&lt;/defaultValueExpression&gt;
  &lt;/parameter&gt;
  &lt;parameter name="Titre" class="java.lang.String"/&gt;
  &lt;queryString&gt;
      &lt;![CDATA[select id from jiraissue]]&gt;
  &lt;/queryString&gt;
  &lt;field name="id" class="java.math.BigDecimal"/&gt;
  &lt;background&gt;
      &lt;band splitType="Stretch"/&gt;
  &lt;/background&gt;
  &lt;title&gt;
      &lt;band height="46" splitType="Stretch"&gt;
          &lt;textField&gt;
              &lt;reportElement x="89" y="15" width="180" height="20"/&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression class="java.lang.String"&gt;&lt;![CDATA[$P{Titre}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
      &lt;/band&gt;
  &lt;/title&gt;
  &lt;pageHeader&gt;
      &lt;band height="35" splitType="Stretch"/&gt;
  &lt;/pageHeader&gt;
  &lt;columnHeader&gt;
      &lt;band height="13" splitType="Stretch"/&gt;
  &lt;/columnHeader&gt;
  &lt;detail&gt;
      &lt;band height="185" splitType="Stretch"&gt;
          &lt;stackedBar3DChart&gt;
              &lt;chart&gt;
                  &lt;reportElement x="57" y="16" width="420" height="165"/&gt;
                  &lt;chartTitle/&gt;
                  &lt;chartSubtitle/&gt;
                  &lt;chartLegend/&gt;
              &lt;/chart&gt;
              &lt;categoryDataset&gt;
                  &lt;dataset&gt;
                      &lt;datasetRun subDataset="New Dataset 1"&gt;
                          &lt;datasetParameter name="SQL"&gt;
                              &lt;datasetParameterExpression&gt;&lt;![CDATA[$P{SQL}]]&gt;&lt;/datasetParameterExpression&gt;
                          &lt;/datasetParameter&gt;
                          &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                      &lt;/datasetRun&gt;
                  &lt;/dataset&gt;
                  &lt;categorySeries&gt;
                      &lt;seriesExpression&gt;&lt;![CDATA[$F{champ2}]]&gt;&lt;/seriesExpression&gt;
                      &lt;categoryExpression&gt;&lt;![CDATA[$F{champ1}]]&gt;&lt;/categoryExpression&gt;
                      &lt;valueExpression&gt;&lt;![CDATA[$F{nb}]]&gt;&lt;/valueExpression&gt;
                  &lt;/categorySeries&gt;
              &lt;/categoryDataset&gt;
              &lt;bar3DPlot&gt;
                  &lt;plot/&gt;
                  &lt;itemLabel color="#000000" backgroundColor="#FFFFFF"/&gt;
                  &lt;categoryAxisFormat&gt;
                      &lt;axisFormat&gt;
                          &lt;labelFont/&gt;
                          &lt;tickLabelFont/&gt;
                      &lt;/axisFormat&gt;
                  &lt;/categoryAxisFormat&gt;
                  &lt;valueAxisFormat&gt;
                      &lt;axisFormat&gt;
                          &lt;labelFont/&gt;
                          &lt;tickLabelFont/&gt;
                      &lt;/axisFormat&gt;
                  &lt;/valueAxisFormat&gt;
              &lt;/bar3DPlot&gt;
          &lt;/stackedBar3DChart&gt;
      &lt;/band&gt;
  &lt;/detail&gt;
  &lt;columnFooter&gt;
      &lt;band height="24" splitType="Stretch"/&gt;
  &lt;/columnFooter&gt;
  &lt;pageFooter&gt;
      &lt;band height="20" splitType="Stretch"/&gt;
  &lt;/pageFooter&gt;
  &lt;summary&gt;
      &lt;band height="22" splitType="Stretch"/&gt;
  &lt;/summary&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Update</strong>
  I have solved the problem by moving the chart to the summary part :)</p>