title: Jasper Reports: using sub-request in $X{} clause
body: <p>I currently have a set of parameters, one of them being a collection of some id's called  <code>ou_ids[]</code> , and in my report query it is used in $X{} clause:</p>
  
  <p><code>AND $X{IN, ou_id, ou_id[]}</code></p>
  
  <p>The trick is, now i have to compare my <code>ou_id</code> to a different set of id's which can be obtained by the following query</p>
  
  <p><code>SELECT DISTINCT ous.id FROM ous WHERE "OUS"."TYPE" IN ('OU::Center', 'OU::Sector') START WITH id IN (10204, 10350) CONNECT BY PRIOR id = parent_id</code></p>
  
  <p>, where <code>(10204, 10350)</code> is an example set of id's, which is to be replaced by <code>ou_ids[]</code> </p>
  
  <p>So basically, i have to gather a bigger set of id's by somehow processing a set i get from a parameter.</p>
  
  <p>So, the <strong>question is</strong>: what is the best way to incorporate the new query to my report query?</p>