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)
dynamic parameter default value
Rainer
Hi all,
I have a report which contains a parameter which gets its values from a dataSet. Parameter data differs from day to day but it always contains three values. So I want to set a default value which I cannot compute by script because as mentioned above the values differ from time to time. So lets say I want to set the default to the medium value. I tried to use parameters getDefaultValueList event handler to achive this but I am not able to get the selection list as it comes from the dataset. Does anybody know a way to solve the problem? Thanks in advance
Rainer
Find more posts tagged with
Comments
kclark
Take a look at <a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/356-all-parameter-values/'>this
devshare</a> it shows how to select a default parameter by script. The report does this in the beforeOpen() <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if( params["NewParameter"].value != "(All Customers)" ){
this.queryText = this.queryText + " where customernumber = " + params["NewParameter"].value
}
</pre>
<br />
As you can see in the above code it checks first to see what the current selection is and then changes if needed.