Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Parameter List Box Multiple Select
rmah
<p>Hello,</p>
<p> </p>
<p>I have a report I created in BIRT 2.6.1.</p>
<p> </p>
<p>I have flattened a hierarchy in a multi-select list box. I am having an issue passing the parameter correctly when a parent is selected and want to return all child values.</p>
<p> </p>
<p>The report pulls in application data details grouped by organizations.</p>
<p> </p>
<p>An example:</p>
<p>User 1 wants to return all details of applications assigned to an Organization.</p>
<p>The report lists all organizations using a concatenation of the parent child relationships.</p>
<p>apps can be associated to any organization at any hierarchical level</p>
<p> </p>
<p>Parameter List</p>
<p>RootOrganization</p>
<p>RootOrganization\ChildOrganization1</p>
<p> </p>
<p>If the user selects RootOrganization, they want all of the subsequent organizations' applications.</p>
<p> </p>
<p>How can I pass a parameter to the query that will allow multiple selections and also return child organizations when only the RootOrganization is selected.</p>
<p> </p>
<p>Thank you in advance for all of your help!</p>
<p> </p>
<div> </div>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>The short answer to your question is that you will need to modify your query dynamically by writing script in the beforeOpen method of the query. The statement</p>
<p> </p>
<p><span style="font-family:'courier new', courier, monospace;">this.queryText</span></p>
<p> </p>
<p>will return the text of your data set query. From there, you can modify/add the WHERE clause programmatically based on the values passed from the report parameter. Not knowing exactly how your WHERE clause is currently built, it is hard for us to give you a working example.</p>
<p> </p>
<p>Another thing you might consider is using cascading parameters. With cascading parameters, the values of the second parameter are based on user selection of the first parameter. If you make the second parameter optional, the query could be changed to use only the value of the first parameter if a null value is passed as the second parameter.</p>
<p> </p>
<p>Just in case this scenario works for you, I have attached a quick example using Classic Models.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>