title: JasperReports: Converting String into array and populating List with it
body: <p>What I have is this <code>String [125, 154, 749, 215, 785, 1556, 3214, 7985]</code>
  (string can have anything from 1 to 15 ID's in it and the reason it is a string and not a List is that, its being sent through a URL)</p>
  
  <p>I need to populate a List called <code>campusAndFaculty</code> with it</p>
  
  <p><strong>I am using iReport 5.0.0</strong></p>
  
  <p>I've tried entering this in the <code>campusAndFaculty</code> default value Expression field</p>
  
  <pre><code>Array.asList(($P{campusAndFacultyString}.substring( 1, ($P{campusAndFacultyString}.length() -2 ))).split("\\s*,\\s*"))
  </code></pre>
  
  <p>But it does not populate the <code>campusAndFaculty</code> List</p>
  
  <p>Any idea how I can populate the <code>List campusAndFaculty</code> using that <code>String ("campusAndFacultyString")</code>?</p>
  
  <p><strong>======================
  UPDATE</strong></p>
  
  <p>I have these variables in iReport (5.0.0)</p>
  
  <pre><code>String campusAndFacultyFromBack = "[111, 125, 126, 4587, 1235, 1259]"
  
  String noBrackets = $P{campusAndFacultyFromBack}.substring(1 ($P{campusAndFacultyFromBack}.length() -1 ))
  
  List campusAndFacultyVar = java.util.Arrays.asList(($V{noBrackets}).split("\\s*,\\s*"))
  </code></pre>
  
  <p>When I print campusAndFacultyVar It returns "[111, 125, 126, 4587, 1235, 1259]"</p>
  
  <p>but when I use it in a Filter I get the "Cannot evaluate the following expression: org_organisation.org_be_id in null"</p>