views:

28

answers:

0

Hello, I am creating jasper reports to whom I have to assign one ID to each of them. For this I have use following code.

            int reportid=1;
            HashMap<String, Integer> map = new HashMap<String, Integer>();
 map.put("repid",reportid);     
 jasper = JasperFillManager.fillReport("reports/FILE_TYPE.jasper", map,con);
 reportid++;

I have mentioned the parameter in respective .jrxml file as shown below

  <parameter name="repid"  class="java.lang.Integer">
  <defaultValueExpression ><![CDATA[$P{repid}]]></defaultValueExpression>

Whenever I run the same code again , no new report is created with new report id but previous report gets displayed with additional data.