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)
Interactive report filter value selection
mehdiesteghamat
<p>hi All,</p>
<p> </p>
<p>I am just trying to use BIRT 2.3 to implement an interactive filter selection where users can pick a field of the report from a dropdown no. 1 and select a value for it from a second dropdown no 2.</p>
<p> </p>
<p>I'd like everything to be done inside the report template using scripting. Is it possible for a page to interact with users in this manner. </p>
<p> </p>
<p>Please let me know.</p>
<p> </p>
<p>Thank you,</p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>You should be able to accomplish this using text elements with HTML/Javascript to create the drop downs and then rerun the report by passing it parameters from the values selected in the drop downs.</p>
<p> </p>
<p>Take a look at this example, it does something similar to what you are wanting: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/29016-adding-new-drop-down-in-birt-report-and-changing-query-parameter-based-on-value-from-dropdown/?p=134361'>http://developer.actuate.com/community/forum/index.php?/topic/29016-adding-new-drop-down-in-birt-report-and-changing-query-parameter-based-on-value-from-dropdown/?p=134361</a></p>
;
<p> </p>
<p>On a side note, BIRT 2.3 is really old at this point and I would recommend looking towards upgrading to a newer version.</p>
mehdiesteghamat
<p>hi Jesse,</p>
<p> </p>
<p>I checked that which was helpful.</p>
<p> </p>
<p>But, I need to populate the drop-downs dynamically like cascading parameters; but it is supposed to be different because in my case the first drop down is the list of final report columns which I would like to filter the results based on. After users selects the filtering column, I need to need to populate the second drop-down with list of the distinct values for the previously selected column meaning that I need to</p>
<p> </p>
<p>1) re-run the report </p>
<p>2) get the object for the dataset and pass a "select distinct" to it.</p>
<p>3) when I have all the distinct values, I should be a able to create the html options for the drop-down;</p>
<p> </p>
<p>however, I do not know </p>
<p> </p>
<p>1) how/<strong>when(which event) </strong>I can access the dataset and I can iterate over the rows. (I just use getDataset of a table handle using the Dataset but have no clue how I can get the current row during fetch time from the dataset)</p>
<p>2) when/where I should create my html options provided that all values are available from the previous step.</p>
<p> </p>
<p>and Just one final question:</p>
<p> </p>
<p>1) If I use a Text to run my scripts when are the executed in the report process pipline (i.e. onPrepare, onCreate, onRender, etc.)</p>
<p> </p>
<p>Thanks in advance,</p>
<p> </p>
<p>Soosho</p>
mehdiesteghamat
<p>The issue is that I am limited to insert html during presentation phase (onRender), if I want to use regular BIRT datasets.</p>
JFreeman
<p>There are a couple of options for iterating over the rows in the data set.</p>
<p> </p>
<p>When the report is running, you can have code in the data set events beforeOpen and onFetch to read the rows as they are created and then use some logic to create a persistent global variable with an array of the values you want available later on.</p>
<p> </p>
<p>Alternatively, you can also use the Design Engine API to to manually run the data set and then iterate over the rows.</p>
<p>Take a look at the example in this post: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/35930-running-a-query-in-the-initalize/?p=133369'>http://developer.actuate.com/community/forum/index.php?/topic/35930-running-a-query-in-the-initalize/?p=133369</a></p>
;