Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Getting the values of a multi select listbox in onRender - beforeGeneration
Migrateduser
<p>Good afternoon everyone,</p><p>I am working on a birt report in version 3.7.2 using a parameter that is a multiselect listbox. Current I have been able to get the selections from the listbox in the beforeOpen method of my scripted query using params. Below is a generalized sample of the code.</p><p> </p><p><strong class='bbc'>for </strong>(i = 0; i < params["testCode"].length; i++)</p><p>{</p><p> </p><p><strong class='bbc'>if</strong>(params["testCode"].value
== "First Selected Item")</p><p>{</p><p>filter += 1</p><p> </p><p><strong class='bbc'>if</strong>(params["testCode"].value
== "Second Selected Item")</p><p>{</p><p>filter += 1</p><p>}</p><p>....</p><p>}</p><p> </p><p>I need to do something similar in the onRender - beforeGeneration method to properly label my chart. When I attempted to use params I received an error as I assume this call cannot be used there. So I was able to use the following call below</p><p> </p><p><strong class='bbc'>var </strong>scriptable = icsc.getExternalContext().getScriptable();</p><p>scriptable.getParameterValue("testCode").length</p><p> </p><p>to get length of the array. I have attempted various calls to get the actual value of position
of the array, but have so far been unsuccessful. Any information that anyone might be able to provide would be most appreciated.</p><p> </p><p>Thanks,</p><p> </p><p>Adam Brousseau</p>
Find more posts tagged with
Comments
There are no comments yet