title: iReport 4.1.3 table component never shows the first entry of the dataset
body: <p>I have a probably simple problem when using ireport table component. I'm using XML as the datasource for the report.</p>
  
  <p>The problem is that the table never shows the first entry of the dataset associated with it.
  Imagine I have this data:</p>
  
  <pre><code>&lt;name&gt;
     &lt;first&gt;adam 1&lt;/first&gt;
     &lt;last&gt;sand 1&lt;/last&gt;          
  &lt;/name&gt; 
  &lt;name&gt;
     &lt;first&gt;adam 2&lt;/first&gt;
     &lt;last&gt;sand 2&lt;/last&gt;          
  &lt;/name&gt; 
  &lt;name&gt;
     &lt;first&gt;adam 3&lt;/first&gt;
     &lt;last&gt;sand 3&lt;/last&gt;          
  &lt;/name&gt; 
  </code></pre>
  
  <p>The output (table) will be (all data except the first row): </p>
  
  <p>first   last<br>
  adam 2  sand 2<br>
  adam 3  sand 3</p>
  
  <p>The report template:</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="consumption_in_zones_data" pageWidth="500" pageHeight="802" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0"&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;property name="ireport.layers" value="##Tue Dec 06 12:01:43 GMT 2011\nlayer.0.name=Background\nlayer.0.visible=true\nlayer.0.id=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="#999999"&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="#FFFFCC"&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;subDataset name="table dataset"&gt;
          &lt;parameter name="ZoneID" class="java.lang.String"/&gt;
          &lt;parameter name="PERIOD" class="java.lang.String"/&gt;
          &lt;parameter name="UNIT" class="java.lang.String"/&gt;
          &lt;queryString language="xPath"&gt;
              &lt;![CDATA[/OrganizationData/Building/Zone/Indicator/ActiveEnergy[ZoneID='$P{ZoneID}']]]&gt;
          &lt;/queryString&gt;
          &lt;field name="time" class="java.lang.String"&gt;
              &lt;fieldDescription&gt;&lt;![CDATA[time]]&gt;&lt;/fieldDescription&gt;
          &lt;/field&gt;
          &lt;field name="consumption" class="java.lang.Double"&gt;
              &lt;fieldDescription&gt;&lt;![CDATA[consumption]]&gt;&lt;/fieldDescription&gt;
          &lt;/field&gt;
      &lt;/subDataset&gt;
      &lt;parameter name="ZoneID" class="java.lang.String"/&gt;
      &lt;parameter name="PERIOD" class="java.lang.String"/&gt;
      &lt;parameter name="UNIT" class="java.lang.String"/&gt;
      &lt;queryString language="xPath"&gt;
          &lt;![CDATA[/OrganizationData/Building/Zone/Indicator/ActiveEnergy[ZoneID='$P{ZoneID}']]]&gt;
      &lt;/queryString&gt;
      &lt;field name="time" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[time]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;field name="consumption" class="java.lang.Double"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[consumption]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;variable name="consumption_1" class="java.lang.Double" resetType="Column" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{consumption}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;variable name="consumption_2" class="java.lang.Double" resetType="Column" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{consumption}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;detail&gt;
          &lt;band height="197" splitType="Stretch"&gt;
              &lt;componentElement&gt;
                  &lt;reportElement key="table 1" style="table 1" x="0" y="0" width="500" height="197"/&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"&gt;
                          &lt;datasetParameter name="ZoneID"&gt;
                              &lt;datasetParameterExpression&gt;&lt;![CDATA[$P{ZoneID}]]&gt;&lt;/datasetParameterExpression&gt;
                          &lt;/datasetParameter&gt;
                          &lt;datasetParameter name="PERIOD"&gt;
                              &lt;datasetParameterExpression&gt;&lt;![CDATA[$P{PERIOD}]]&gt;&lt;/datasetParameterExpression&gt;
                          &lt;/datasetParameter&gt;
                          &lt;datasetParameter name="UNIT"&gt;
                              &lt;datasetParameterExpression&gt;&lt;![CDATA[$P{UNIT}]]&gt;&lt;/datasetParameterExpression&gt;
                          &lt;/datasetParameter&gt;
                          &lt;dataSourceExpression&gt;&lt;![CDATA[$P{REPORT_DATA_SOURCE}]]&gt;&lt;/dataSourceExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:column width="90"&gt;
                          &lt;jr:tableHeader style="table 1_TH" height="30" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30"/&gt;
                                  &lt;textElement textAlignment="Center"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{PERIOD}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:tableHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="20"/&gt;
                                  &lt;textElement textAlignment="Center"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{time}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="90"&gt;
                          &lt;jr:tableHeader style="table 1_TH" height="30" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30"/&gt;
                                  &lt;textElement textAlignment="Center"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{UNIT}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:tableHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="20"/&gt;
                                  &lt;textElement textAlignment="Center"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{consumption}]]&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>
  
  <p>Data snippet: </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;OrganizationData&gt;
    &lt;Building&gt;
      &lt;BuildingID&gt;71721890-efd1-012c-c545-0a48cbee2b22&lt;/BuildingID&gt;
      &lt;BuildingName&gt;PT&lt;/BuildingName&gt;
      &lt;Tariff&gt;low&lt;/Tariff&gt;
      &lt;Zone&gt;
        &lt;ZoneID&gt;bceba570-d0e2-012e-d950-7ac0bc5389eb&lt;/ZoneID&gt;
        &lt;BuildingID&gt;71721890-efd1-012c-c545-0a48cbee2b22&lt;/BuildingID&gt;
        &lt;ZoneName&gt;PT - Zone A&lt;/ZoneName&gt;
        &lt;Type&gt;ROUT&lt;/Type&gt;
        &lt;Indicator&gt;
          &lt;IndicatorID&gt;96a41e20-60d8-012d-516c-5aacf9dbb012&lt;/IndicatorID&gt;
          &lt;ZoneID&gt;bceba570-d0e2-012e-d950-7ac0bc5389eb&lt;/ZoneID&gt;
          &lt;BuildingID&gt;71721890-efd1-012c-c545-0a48cbee2b22&lt;/BuildingID&gt;
          &lt;IndicatorName&gt;EA+ BlA P0&lt;/IndicatorName&gt;
          &lt;ActiveEnergy&gt;
            &lt;IndicatorID&gt;96a41e20-60d8-012d-516c-5aacf9dbb012&lt;/IndicatorID&gt;
            &lt;ZoneID&gt;bceba570-d0e2-012e-d950-7ac0bc5389eb&lt;/ZoneID&gt;
            &lt;BuildingID&gt;71721890-efd1-012c-c545-0a48cbee2b22&lt;/BuildingID&gt;
            &lt;time&gt;01 Oct&lt;/time&gt;
            &lt;consumption&gt;0.1&lt;/consumption&gt;
          &lt;/ActiveEnergy&gt;
          &lt;ActiveEnergy&gt;
            &lt;IndicatorID&gt;96a41e20-60d8-012d-516c-5aacf9dbb012&lt;/IndicatorID&gt;
            &lt;ZoneID&gt;bceba570-d0e2-012e-d950-7ac0bc5389eb&lt;/ZoneID&gt;
            &lt;BuildingID&gt;71721890-efd1-012c-c545-0a48cbee2b22&lt;/BuildingID&gt;
            &lt;time&gt;02 Oct&lt;/time&gt;
            &lt;consumption&gt;0.1&lt;/consumption&gt;
          &lt;/ActiveEnergy&gt;
        &lt;/Indicator&gt;
      &lt;/Zone&gt;
    &lt;/Building&gt;
  &lt;/OrganizationData&gt;
  </code></pre>
  
  <p>thanks in advance,
  Nuno</p>