title: JasperReports: Parameters or Fields?
body: <p>I was wondering if there are any performance benefits (or other benefits) to filling a JasperReport with fields values instead of parameters.</p>
  
  <p>For instance, say I want to populate a pie chart with 10 pie slices.</p>
  
  <p>What benefits - if any - are there to setting the pie's expressions to:</p>
  
  <pre><code>JRDesignExpression key = new JRDesignExpression("$F{PieSlice}.key");
  JRDesignExpression label = new JRDesignExpression("$F{PieSlice}.label");
  JRDesignExpression value = new JRDesignExpression("$F{PieSlice}.value");
  </code></pre>
  
  <p>...as opposed to this:</p>
  
  <pre><code>Map&lt;String,String&gt; params = new HashMap&lt;String,String&gt;();
  params.put("pie-slice-key-01", "foo");
  params.put("pie-slice-label-01", "Foo");
  params.put("pie-slice-value-01", .25);
  // ... etc.
  
  JasperPrint print = JasperFillManager.fill(jasperDesign, params);
  
  // ...
  
  JRDesignExpression key = new JRDesignExpression("$P{pie-slice-key-01}");
  JRDesignExpression label = new JRDesignExpression("$P{pie-slice-label-01}");
  JRDesignExpression value = new JRDesignExpression("$P{pie-slice-value-01}");
  
  JRDesignExpression key = new JRDesignExpression("$P{pie-slice-key-02}");
  JRDesignExpression label = new JRDesignExpression("$P{pie-slice-label-02}");
  JRDesignExpression value = new JRDesignExpression("$P{pie-slice-value-02}");
  
  // ...etc.
  </code></pre>
  
  <p>Thanks in advance!</p>