Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Parameter with Dynamic Multi default value
Baku
Hello all, <br />
I am new to BIRT and try to do this :<br />
<br />
- I have 1 dynamic parameter, displayed as list box and allowing multiple values. <br />
My problem is that I don't know how to select all the values as default value.<br />
<br />
In getDefaultValueList() the dataSetRow["myColumn"] is unknow, so i can't do something like this (I don't even know if it's the good way for doing this...) :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var array = [];
for(i = 0; i < dataSetRow["myColumn"].length ; i++){
array[i] = dataSetRow["myColumn"].value[i];
}
array;
</pre>
<br />
Thanks for your help.
Find more posts tagged with
Comments
Baku
Plz i really need help for this !
How can i select multi default value ??
Baku
I will explain why i need to do this, maybe there is another way for my issue :<br />
<br />
I want to add in my report a html component listing all the categories :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<select onchange="location.href='/viewer/preview?_myreport...myparams=...>
<option value="category1">category1</option>
<option value="category2">category2</option>
<option value="category3">category3</option>
</select>
</pre>
<br />
To access to my categories i wanted a parameter listing by default all the categories, so I can browse the table to retrieve the categories.<br />
<br />
<br />
An alternative could be to retrieve the categories from a PGV, i can do this in theFetch():<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
reportContext.setPersistentGlobalVariable("categories",row["CategoryName"]);
</pre>
<br />
But when i try to get this PVG in a dynamic text (what i need ti build my html component), it seems to only have the last value in my categories, i can't loop on the PVG...<br />
<br />
Plz help me with this...
cypherdj
In the report design when you defined a multi-value parameter, did you specify the parameter values as static or dynamic?
If static, you would click New and add the value and label for each entry (category1, ...).
If dynamic, you define a data set which will get those values and labels for you from the specified data source (csv, db, web service, ...).
Using the web viewer, you will have the possibility to open the parameters dialog to select the values from the list before you run the report.
In other words, you do not need to create an HTML page with your multi-select parameter, the web viewer will prompt for the parameters as you have defined them in your report design.
Baku
<blockquote class='ipsBlockquote' data-author="'cypherdj'" data-cid="81361" data-time="1312931908" data-date="09 August 2011 - 04:18 PM"><p>
In the report design when you defined a multi-value parameter, did you specify the parameter values as static or dynamic?<br />
<br />
If static, you would click New and add the value and label for each entry (category1, ...).<br />
<br />
If dynamic, you define a data set which will get those values and labels for you from the specified data source (csv, db, web service, ...).<br />
<br />
Using the web viewer, you will have the possibility to open the parameters dialog to select the values from the list before you run the report.<br />
<br />
In other words, you do not need to create an HTML page with your multi-select parameter, the web viewer will prompt for the parameters as you have defined them in your report design.<br /></p></blockquote>
<br />
My multi-value parameter is dynamic, i can choose my DataSet and, yes, i can choose few values from my dataset as default, but it's not exactly what i want.<br />
<br />
I want those default values to be <strong class='bbc'>all </strong>choosen and <strong class='bbc'>dynamicaly</strong>, because my categories can change.<br />
<br />
And if i write in the expression builder for the default values something like <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>row["CategoryName"]</pre> there are no default values selected...<br />
<br />
Do you understand what i need to do ? (english is not my first language so it's not easy to explain what I want..)