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)
Dynamically dropping elements from List
BIRT User
<p>Hi,</p><p> </p><p>I want to drop an child element before its creation based on the current element data value.</p><p> </p><p>I have a report which have one list and under which I have 3 tables.Based on the list dataset values I have to display the tables.</p><p> </p><p>List dataset
row 1--> column1 value = 0 : Display all tables</p><p>row 2--> column1 value = 1 : Display only 1st table</p><p> </p><p>I have used the visibility condition to hide the tables. However the hidden table datasets were executed even though those tables were hidden using visibility propery.</p><p> </p><p>I want to drop table element based on list row content.</p><p>Is there a way to drop element from row context?</p><p> </p><p>I have attached a sample report here.</p><p> </p><p>Please help me to fix this issue.
Thanks,
Ragu</p>
Find more posts tagged with
Comments
wwilliams
<p>reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("tablename").drop();</p>
BIRT User
<p>Hi William,</p><p> </p><p>If i implement the above script, its dropping the element from the whole report context. When the next row looks for that element it won't exist.</p><p> </p><p>Consider the following scenario using the same example.</p><p> </p><p>List dataset
row 1--> column1 value = 1 : Display only 1st table</p><p>row 2--> column1 value = 3 : Display only third table</p><p>row 3--> column1 value = 0 : Display all three tables</p><p> </p><p> </p><p>I want it like this.</p><p> </p><p>When the List first row is created, then I have to keep table1(drop table 1 and table 3)</p><p>and when second row is created, keep table3 (drop table 1 and table 2)</p><p>and finaly for list third row , i have to kepp all the tables in context.</p><p> </p><p>If this is implemented, then unnecessary databse call would be avoided and it will improve the performce of the report.</p><p> </p><p>Please help me if there is a way to implement this.</p><p> </p><p>Thanks,</p><p>Ragu</p>
johnw
<p>If you don't want it to show up, but you still want it in the report, use a Visibility expression instead. I would recommend creating a new binding in the table, and set that based on the condition, and set the visibility expression based on the result of that binding.</p>
BIRT User
<p>Hi John,</p><p>I can use visibility property to hide the element based on some condition. However the datasets were executed and the elements were were created in Generation phase. Only its hidden in presentation phase.</p><p> </p><p>I want to drop the element in generation phase itself before its datset execution and element creation.</p><p> </p><p>Thanks,</p><p>Ragu</p>