title: iReport - Variable - String[] - Initial Value Expression
body: <p>I discovered today in iReport that I cannot set the initial value expression of a String[] using normally valid Java syntax, such as:</p>
  
  <pre class="lang-java prettyprint-override"><code>private String[] fruitNames = new String[] {"Apple", "Banana"};
  </code></pre>
  
  <p>Extrapolating this into an iReport variable would be something as simple as this (I would think):</p>
  
  <p><em><strong>Name</em></strong>: fruitNames</p>
  
  <p><em><strong>VariableClass</em></strong>: java.lang.String[]</p>
  
  <p><em><strong>Calculation</em></strong>: Nothing</p>
  
  <p><em><strong>Reset Type</em></strong>: Report</p>
  
  <p><em><strong>IncrementType</em></strong>: None</p>
  
  <p><em><strong>Initial Value Expression</em></strong>: new String[]{"Apple", "Banana"}</p>
  
  <p>Compiling my report template I get an error:</p>
  
  <blockquote>
    <p>Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@683896bd >net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions c>lass file: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: >calculator_Fruits_1326149102402_537017: 281: unexpected token: Apple @ line 281, column 55. >1 error</p>
  </blockquote>
  
  <p>In the code editor for setting the initial value I notice that the parser underlines, in red, the curly braces {}.  This makes sense because iReport interprets these braces as param, field, or variable identifiers.  So I see where the conflict can exist, but does anyone know the proper syntax to use for initializing String[] in the Initial Value Expression field?</p>
  
  <p>Note:  I got around the issue by just setting the value in a Scriptlet, but I'm really curious to know the proper syntax, if it exists.</p>