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)
How to skip second param based on first param value?
Mani Kandan
<p>I am designing a report, in which i have two parameters such as country and state. I need to give "select all" option in country, so if user select this all option, then without selecting a state the report should be executed.</p>
<p> </p>
<p>I have tried by creating cascading parameters with multipledataset, but after selecting the first param an ajax is passed to get second param inputs, so i need to avoid this ajax if user choose "select all" option, can we do this way for my problem?</p>
<p>or any other way to do this?</p>
Find more posts tagged with
Comments
micajblock
<p>Check this out <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1068-simple-example-of-select-all-parameter/'>http://developer.actuate.com/community/forum/index.php?/files/file/1068-simple-example-of-select-all-parameter/</a></p>
;
Mani Kandan
<p>actually i have two param, country and state, if user choose all in country list i need to show all country and so that the state param should not be shown, if user select any country i should show state param to select state..</p>
<p>so how to disable another param based on a param value.</p>
micajblock
<p>What version of BIRT?</p>
Mani Kandan
<p>BIRT version is 4.4.2.</p>
micajblock
<p>Attached is an example using Classic Models. Hope this helps.</p>
Mani Kandan
<p>Mr.Block, i have two parameters, and also i would like to skip second param if the user choosing "all" for first param.But the report you have given has a single param.Please help me , how can i avoid second param when a use choose "all" from first parameter list.</p>
micajblock
<p>My report has 2 parameters. Just set the default of both parameters to 'All'</p>
Mani Kandan
<p>I can see only one report parameter named as "office" only in your report, but i need to have two report parameter that should be cascaded, because second parameter depends first parameter value, so if first reportparam is chosen to all, then second should be avoided.</p>
micajblock
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="138235" data-time="1438729672">
<div>
<p>Attached is an example using Classic Models. Hope this helps.</p>
</div>
</blockquote>
<p>In this post I changed it so it uses 2 parameters. Here it is again.</p>
Mani Kandan
<p>yes it solves the problem and the report <strong><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?app=core&module=attach§ion=attach&attach_id=12056'
title="Download attachment">Cascade All.rptdesign</a> </strong>has two parameters.</p>
<p> </p>
<p>The expected solution i got from your report is here,</p>
<p> </p>
<p>setting default value to 'All' in both parameters, so when user just click "ok", so 'All' is the selected(default) value for both parameters, so it matched with the query params. In query itself has the real solution for my problem.</p>
<pre class="_prettyXprint _lang-sql _linenums:1">
select country,city,customername
from customers
where (('All' = ?) or (country = ?))
and (('All' = ?) or (city = ?))
</pre>
<p>so when a param has 'All' selected, then it should become the boolean because('All'='All'). so the query becomes ,</p>
<pre class="_prettyXprint _lang-sql">
select country,city,customername
from customers
where true
and true
</pre>
<p>so it shows all customer details,.I think this is the scenario where i have failed to think.</p>
<p> </p>
<p>Mr.mblock please correct me if i am wrong.</p>
micajblock
<p>No you are not wrong.</p>
Mani Kandan
<p>Thanks mblock.</p>