title: IReport "parameter Not Found" when adding a parameter
body: <p>I am using IReport 4.8.0.
  I created a dataset and using it for a table and a chart and everything works fine.</p>
  
  <p>Now i want to add a string parameter so the user can insert a name of city.</p>
  
  <p>so i added a new string parameter inside the dataset and dragged it into Page Header.
  i also updated the Dataset query so it will receive the value from the parameter:</p>
  
  <pre><code>SELECT
   COUNT(leads.`status`) AS Number_Of_Status,
   leads.`status` AS leads_status,
   leads.`primary_address_city` AS leads_primary_address_city
  FROM
   `leads` leads
  WHERE
   leads.`primary_address_city` = $P{city_to_choose}
  GROUP BY
   leads.`status`
  </code></pre>
  
  <p>but all i get when pushing the "preview" is "Parameter Not Found: city_to_choose"
  what did i miss? </p>
  
  <p><img src="https://i.stack.imgur.com/yZr4j.jpg" alt="enter image description here"></p>
  
  <p>The xml code of the report is:</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="report44" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="94efea4a-2952-4cb2-9d88-3f853af2a264"&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;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;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#EFF7FF"/&gt;
      &lt;/conditionalStyle&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;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#EFF7FF"/&gt;
      &lt;/conditionalStyle&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;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#EFF7FF"/&gt;
      &lt;/conditionalStyle&gt;
  &lt;/style&gt;
  &lt;style name="table 3"&gt;
      &lt;box&gt;
          &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
      &lt;/box&gt;
  &lt;/style&gt;
  &lt;style name="table 3_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 3_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 3_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
      &lt;box&gt;
          &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
      &lt;/box&gt;
      &lt;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#EFF7FF"/&gt;
      &lt;/conditionalStyle&gt;
  &lt;/style&gt;
  &lt;style name="table 4"&gt;
      &lt;box&gt;
          &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
      &lt;/box&gt;
  &lt;/style&gt;
  &lt;style name="table 4_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 4_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 4_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
      &lt;box&gt;
          &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
      &lt;/box&gt;
      &lt;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#EFF7FF"/&gt;
      &lt;/conditionalStyle&gt;
  &lt;/style&gt;
  &lt;subDataset name="New Dataset 1" uuid="281c076f-1c95-4550-aa87-5ee8f14654a6"&gt;
      &lt;parameter name="city_to_choose" class="java.lang.String"&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA["Cupertino"]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;queryString&gt;
          &lt;![CDATA[SELECT
   COUNT(leads.`status`) AS Number_Of_Status,
   leads.`status` AS leads_status,
   leads.`primary_address_city` AS leads_primary_address_city
  FROM
   `leads` leads
  WHERE
   leads.`primary_address_city` = $P{city_to_choose}
  GROUP BY
   leads.`status`]]&gt;
      &lt;/queryString&gt;
      &lt;field name="Number_Of_Status" class="java.lang.Long"/&gt;
      &lt;field name="leads_status" class="java.lang.String"/&gt;
      &lt;field name="leads_primary_address_city" class="java.lang.String"/&gt;
      &lt;group name="Number_Of_Status"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{Number_Of_Status}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&gt;
  &lt;/subDataset&gt;
  &lt;queryString&gt;
      &lt;![CDATA[select 1 as dummy_field]]&gt;
  &lt;/queryString&gt;
  &lt;background&gt;
      &lt;band splitType="Stretch"/&gt;
  &lt;/background&gt;
  &lt;title&gt;
      &lt;band height="50"/&gt;
  &lt;/title&gt;
  &lt;pageHeader&gt;
      &lt;band height="50"&gt;
          &lt;textField pattern=""&gt;
              &lt;reportElement uuid="ba67dc80-1d24-4900-8bae-95562947f757" x="114" y="17" width="100" height="20"/&gt;
              &lt;textElement/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$P{city_to_choose}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
      &lt;/band&gt;
  &lt;/pageHeader&gt;
  &lt;detail&gt;
      &lt;band height="238" splitType="Stretch"&gt;
          &lt;componentElement&gt;
              &lt;reportElement uuid="2692dbf7-e921-4098-a140-9ed1fc602281" key="table 4" style="table 4" x="0" y="0" width="555" height="190"/&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="New Dataset 1" uuid="64281428-2692-42a5-b3c0-357fd1662cb0"&gt;
                      &lt;connectionExpression&gt;&lt;![CDATA[$P{REPORT_CONNECTION}]]&gt;&lt;/connectionExpression&gt;
                  &lt;/datasetRun&gt;
                  &lt;jr:column width="90" uuid="13b614d9-0f9f-423e-8fca-4a5f2bce1dfb"&gt;
                      &lt;jr:tableHeader style="table 4_TH" height="30"/&gt;
                      &lt;jr:tableFooter style="table 4_TH" height="30"/&gt;
                      &lt;jr:columnHeader style="table 4_CH" height="30"&gt;
                          &lt;staticText&gt;
                              &lt;reportElement uuid="e89c0625-fb19-4b97-9bbc-80111f5d5055" x="0" y="0" width="90" height="30"/&gt;
                              &lt;textElement/&gt;
                              &lt;text&gt;&lt;![CDATA[Lead Status]]&gt;&lt;/text&gt;
                          &lt;/staticText&gt;
                      &lt;/jr:columnHeader&gt;
                      &lt;jr:columnFooter style="table 4_CH" height="30"/&gt;
                      &lt;jr:detailCell style="table 4_TD" height="20"&gt;
                          &lt;textField&gt;
                              &lt;reportElement uuid="f05e13d6-93ba-42df-ab80-65f156bec0e5" x="0" y="0" width="90" height="20"/&gt;
                              &lt;textElement/&gt;
                              &lt;textFieldExpression&gt;&lt;![CDATA[$F{leads_status}]]&gt;&lt;/textFieldExpression&gt;
                          &lt;/textField&gt;
                      &lt;/jr:detailCell&gt;
                  &lt;/jr:column&gt;
                  &lt;jr:column width="90" uuid="769cd50d-72b1-42f9-9c21-6c9de4a257df"&gt;
                      &lt;jr:tableHeader style="table 4_TH" height="30"/&gt;
                      &lt;jr:tableFooter style="table 4_TH" height="30"/&gt;
                      &lt;jr:columnHeader style="table 4_CH" height="30"&gt;
                          &lt;staticText&gt;
                              &lt;reportElement uuid="68e27cb2-6b6d-436a-8b28-a495df0a2243" x="0" y="0" width="90" height="30"/&gt;
                              &lt;textElement/&gt;
                              &lt;text&gt;&lt;![CDATA[Status Count]]&gt;&lt;/text&gt;
                          &lt;/staticText&gt;
                      &lt;/jr:columnHeader&gt;
                      &lt;jr:columnFooter style="table 4_CH" height="30"/&gt;
                      &lt;jr:detailCell style="table 4_TD" height="20"&gt;
                          &lt;textField&gt;
                              &lt;reportElement uuid="6dcea81c-8d64-4e87-8c91-c958dba68005" x="0" y="0" width="90" height="20"/&gt;
                              &lt;textElement/&gt;
                              &lt;textFieldExpression&gt;&lt;![CDATA[$F{Number_Of_Status}]]&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;pageFooter&gt;
      &lt;band splitType="Stretch"/&gt;
  &lt;/pageFooter&gt;
  &lt;summary&gt;
      &lt;band height="232" splitType="Stretch"&gt;
          &lt;pie3DChart&gt;
              &lt;chart&gt;
                  &lt;reportElement uuid="0838f48f-8053-4f24-b429-74124641b223" x="0" y="0" width="555" height="232"/&gt;
                  &lt;chartTitle/&gt;
                  &lt;chartSubtitle/&gt;
                  &lt;chartLegend/&gt;
              &lt;/chart&gt;
              &lt;pieDataset&gt;
                  &lt;dataset&gt;
                      &lt;datasetRun subDataset="New Dataset 1" uuid="88beae40-88ab-4f36-9f8a-9206883f0a05"/&gt;
                  &lt;/dataset&gt;
                  &lt;keyExpression&gt;&lt;![CDATA[$F{leads_status}]]&gt;&lt;/keyExpression&gt;
                  &lt;valueExpression&gt;&lt;![CDATA[$F{Number_Of_Status}]]&gt;&lt;/valueExpression&gt;
              &lt;/pieDataset&gt;
              &lt;pie3DPlot&gt;
                  &lt;plot/&gt;
                  &lt;itemLabel/&gt;
              &lt;/pie3DPlot&gt;
          &lt;/pie3DChart&gt;
      &lt;/band&gt;
  &lt;/summary&gt;
  </code></pre>
  
  <p></p>