title: JasperReports Server: Multi select query in report using input parameter
body: <p>Please help me to pass a input parameter in my report so that i can use a multi select query with the use of parameter.  </p>
  
  <p>In my report i am using <code>$x{IN,ADMIN1,admins}</code> but getting </p>
  
  <blockquote>
    <p>error: wrong type java.lang.string for parameter admins, admins should be an array or collection.</p>
  </blockquote>
  
  <p>Mysql query:  </p>
  
  <pre class="lang-sql prettyprint-override"><code>Select ADMIN1,WEEK1,WEEK2,WEEK3,(((WEEK3-WEEK2)/WEEK2)*100) as percentage_change, (WEEK3-
  
  WEEK2) as MSU_Difference,SUMWEEK2,SUMWEEK3,SUMWEEK,WEEK4,WEEK5,(((WEEK5-WEEK4)/WEEK4)*100)
  
   as percentage_change_PRE,admin,ORGNo,OrgAbbr,msus from ((select admin as ADMIN1, sum(msu) 
  
  as WEEK1 from sccp_raw where dt &gt;= date_sub(date($P{start_date}), INTERVAL 14 DAY) and dt 
  
  &lt; date_sub(date($P{end_date}), INTERVAL 13 DAY) group by admin order by WEEK1) as 
  
  q1,(select admin as ADMIN2, sum(msu) as WEEK2 from sccp_raw where dt &gt;= 
  
  date_sub(date($P{start_date}), INTERVAL 7 DAY) and dt &lt; date_sub(date($P{end_date}), 
  
  INTERVAL 6 DAY) group by admin order by WEEK2) as q2,(select admin as ADMIN3, sum(msu) as 
  
  WEEK3 from sccp_raw where dt between $P{start_date} and $P{end_date} group by admin order 
  
  by WEEK3) as q3,(select sum(msu) as SUMWEEK2 from sccp_raw where dt &gt;= 
  
  date_sub(date($P{start_date}), INTERVAL 7 DAY) and dt &lt; date_sub(date($P{end_date}), 
  
  INTERVAL 6 DAY))as q4,(select sum(msu) as SUMWEEK3 from sccp_raw where dt &gt;= 
  
  date_sub(date($P{start_date}), INTERVAL 14 DAY) and dt &lt; date_sub(date($P{end_date}), 
  
  INTERVAL 13 DAY))as q5,(select sum(msu) as SUMWEEK from sccp_raw where dt BETWEEN 
  
  $P{start_date} and $P{end_date})as q6,(select sum(msu) as WEEK4 from sccp_raw where dt &gt;= 
  
  date_sub(date($P{start_date}), INTERVAL 372 DAY) and dt &lt; date_sub(date($P{end_date}), 
  
  INTERVAL 371 DAY)) as q7,(select sum(msu) as WEEK5 from sccp_raw where dt &gt;= 
  
  date_sub(date($P{start_date}), INTERVAL 365 DAY) and dt &lt; date_sub(date($P{end_date}), 
  
  INTERVAL 364 DAY)) as q8,(select sum(msu) as MSU from sccp_raw where dt between 
  
  $P{start_date} and $P{end_date}) as q9,(select a.dt,a.admin,b.ORGNo, b.OrgAbbr, sum(a.msu) 
  
  as msus from sccp_raw a left join (select ORGNo, ADMINS, OrgAbbr from orig) b on 
  
  a.admin=b.ADMINS where a.dt between $P{start_date} and $P{end_date} group by a.admin)as 
  
  q10)  where $X{IN,ADMIN1,admins} and ADMIN1=ADMIN3 and ADMIN2=ADMIN3 and admin=ADMIN3 
  
  group by ADMIN1 order by WEEK3 desc; 
  </code></pre>
  
  <p>The parameter's configuration: </p>
  
  <pre><code>parameter "admins":  
  
  class: `java.util.Collection`  
  
  Default Value Expression: "select admin from sccp_raw group by admin"  
  </code></pre>
  
  <p>Also help me to know if i want to create this dropdown to be selected as "all admins" followed by admins list.  </p>