title: Jasper Report graph in iReport repeating
body: <p>I have a line graph in iReport which is incrementally repeating in every page, that is, if the graph has 30 x/y pairs (this is dynamic), the report will have 30 pages, of which the first will have just one value, the 2nd two values, and so on. Only the last one will contain the complete graph.</p>
  
  <p>Questions <a href="https://stackoverflow.com/questions/6622395/chart-repeat-many-time">"chart repeat many time"</a> and <a href="https://stackoverflow.com/questions/6600305/problem-with-charting-using-jasperreport">"Problem with charting using JasperReport"</a> and <a href="https://stackoverflow.com/questions/7111260/how-to-print-the-grand-total-only-in-the-last-page-of-a-very-long-report">"How to print the grand total only in the last page of a very long report?"</a> did <strong>not</strong> solve my problem. I understand that putting the chart in the Detail section makes the chart repeat, but putting it in the Summary, Footer, lastPageFooter, Title, etc. sections makes it display only one value. Same when I put it in the Detail section and use <code>&lt;printWhenExpression&gt;</code>.</p>
  
  <p>My code:</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="nodes-allarmipersistenti" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" 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;field name="day" class="java.lang.Number"/&gt;
      &lt;field name="month" class="java.lang.String"/&gt;
      &lt;field name="year" class="java.lang.String"/&gt;
      &lt;field name="dsunita" class="java.lang.String"/&gt;
      &lt;field name="valueNumber" class="java.lang.Number"/&gt;
      &lt;field name="logo" class="java.lang.String"/&gt;
      &lt;field name="today" class="java.lang.String"/&gt;
      &lt;field name="option" class="java.lang.String"/&gt;
      &lt;title&gt;
          &lt;band height="89"&gt;
              &lt;staticText&gt;
                  &lt;reportElement mode="Opaque" x="0" y="67" width="424" height="22" backcolor="#CCFFFF"/&gt;
                  &lt;textElement textAlignment="Right" verticalAlignment="Middle" markup="none"&gt;
                      &lt;font size="10" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[GRAFICO PARAMETRO]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="600" y="0" width="100" height="38"/&gt;
                  &lt;textElement verticalAlignment="Middle"/&gt;
                  &lt;text&gt;&lt;![CDATA[Stampato in data]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x="700" y="0" width="102" height="38"/&gt;
                  &lt;textElement textAlignment="Right" verticalAlignment="Middle"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{today}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;image&gt;
                  &lt;reportElement x="0" y="0" width="100" height="67"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA[$F{logo}]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="700" y="38" width="102" height="29"/&gt;
                  &lt;textElement textAlignment="Right"/&gt;
                  &lt;text&gt;&lt;![CDATA[MaRe - Telecontrollo]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement mode="Opaque" x="424" y="67" width="378" height="22" backcolor="#CCFFFF"/&gt;
                  &lt;textElement verticalAlignment="Middle"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[' ' + $F{option}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;lastPageFooter&gt;
          &lt;band height="387" splitType="Stretch"&gt;
              &lt;xyLineChart&gt;
                  &lt;chart evaluationTime="Page"&gt;
                      &lt;reportElement x="0" y="0" width="802" height="387"/&gt;
                      &lt;chartTitle/&gt;
                      &lt;chartSubtitle/&gt;
                      &lt;chartLegend/&gt;
                  &lt;/chart&gt;
                  &lt;xyDataset&gt;
                      &lt;dataset incrementType="Report"/&gt;
                      &lt;xySeries&gt;
                          &lt;seriesExpression&gt;&lt;![CDATA["Unità " + $F{dsunita}]]&gt;&lt;/seriesExpression&gt;
                          &lt;xValueExpression&gt;&lt;![CDATA[$F{day}]]&gt;&lt;/xValueExpression&gt;
                          &lt;yValueExpression&gt;&lt;![CDATA[$F{valueNumber}]]&gt;&lt;/yValueExpression&gt;
                      &lt;/xySeries&gt;
                  &lt;/xyDataset&gt;
                  &lt;linePlot&gt;
                      &lt;plot/&gt;
                  &lt;/linePlot&gt;
              &lt;/xyLineChart&gt;
          &lt;/band&gt;
      &lt;/lastPageFooter&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Datasource here is a JRBeanCollectionDataSource.</p>