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)
Multiple Selection Parameter
RobertLacasse
<p>Hello,</p>
<p> </p>
<p>BIRT Version: 4.4.1</p>
<p> </p>
<p>I have a ListBox Parameter with "Allow Multiple Values" checked. And in "beforeOpen" Script, I have following code:</p>
<p>this.queryText = this.queryText.replace(" and NumaricCol in (0)", " and NumaricCol in (" + params["p_Oprtr_ID"].value.join(",") + ")");</p>
<p> </p>
<p>When I selected some (more than one) or All items from the listbox, it worked perfect. However, when I selected only one item, it took significant amount of time to get the result. I did this test many times, and this issue is persistent. I have tested the select statement of the DataSet in database, worked perfect with any scenario.</p>
<p> </p>
<p>Could anybody please let me know if there is anything that I could try to figure out this issue?</p>
<p>Thanks in advance!!!</p>
Find more posts tagged with
Comments
JFreeman
<p>To start I would see if it may have something to do with the performing the join call on the array. Change the parameter back to single selection, remove the .join(",") and see if the issue persists. This will help narrow it down some.</p>
RobertLacasse
<p>Hello Jesse,</p>
<p> </p>
<p>Thank you so much for your reply!!!</p>
<p>I did the test as you suggested:</p>
<p>take out the checkbox on "Allow Multiple Values", and changed the code in "beforeOpen" as following:</p>
<p>this.queryText = this.queryText.replace(" and NumaricCol in (0)", " and NumaricCol in (" + params["p_ID"].value + ")");</p>
<p>The issue persists. I got the result after waiting more than 3 minutes.</p>
<p> </p>
<p>If i change "params["p_ID"].value" TO "params["p_ID"].value[0]", no result returned.</p>
<p> </p>
<p>I do not think that .join(",") causes this issue, because i also tested with FOR() loop. It worked perfect with multiple items selected, but same issue for only one item selected.</p>
<p> </p>
<p>Would you please let me know if there is anything else i could try out...</p>
<p> </p>
<p>Thanks again!!!</p>
JFreeman
<p>Is there a difference in the amount of data being returned by the query when there is only 1 value selected?</p>
<p> </p>
<p>Based on the information you have provided, the issue seems to be with the query itself when only a single value is being added.</p>
<p> </p>
<p>It would be good to understand the timing of the events when the delay is happening. I would recommend enabling logging on the database, if it is not already, to log out when the connection from the designer occurs, what the query received is and when the data has been returned to the designer. This will give insight into the specifics of where the delay is happening.</p>
<p> </p>
<p>I would also examine the query the database is receiving from the designer and test how long that query takes to run from the same machine as where the designer is installed but through a different application.</p>
RobertLacasse
<p>Thank you Jesse for your help!!!</p>
<p>The result returned was correct as expected every time, no matter one or multiple item(s) selected.</p>
<p>I will do more test...</p>
<p>Thanks!</p>