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)
Unable to drop report elements from within another report elements
riyaz_itls
reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("<element_name>").drop();
works from report.beforeFactory() but not inside onCreate() or onRender() of another report element.
I have a grid, a table and a chart in my report. Each of these elements refer to a different dataset.I want to drop the table and chart if the grid's dataset returns no-results. So within a grid column, i do some checks and if the conditions pass i try to drop the table and the chart.
But this doesn't work. Can you pls. help me.
Am using BIRT v3.7.0
Thanks
Riyaz
Find more posts tagged with
Comments
mwilliams
It is too late at this point to drop the grid, you can only hide it. You can do your check and set the display property to "none" with:
this.getStyle().display = "none";
If you want to drop an element, it has to be done earlier.
riyaz_itls
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="92830" data-time="1325092357" data-date="28 December 2011 - 10:12 AM"><p>
It is too late at this point to drop the grid, you can only hide it. You can do your check and set the display property to "none" with:<br />
<br />
this.getStyle().display = "none";<br />
<br />
If you want to drop an element, it has to be done earlier.<br /></p></blockquote>
<br />
Thanks Michael,<br />
<br />
But at this point, is there a way to stop the associated dataset from firing its sql query? I am asking this because BIRT fires dataset queries even when a table is hidden. <br />
<br />
Regards<br />
Riyaz
mwilliams
Unfortunately, I don't believe there is a way to keep the query from running, at this point. If you wanted to drop the table, you could connect to your data in your initialize or beforeFactory script and decide to drop. This will be faster than having the dataSet run.
riyaz_itls
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="93009" data-time="1325258165" data-date="30 December 2011 - 08:16 AM"><p>
Unfortunately, I don't believe there is a way to keep the query from running, at this point. If you wanted to drop the table, you could connect to your data in your initialize or beforeFactory script and decide to drop. This will be faster than having the dataSet run.<br /></p></blockquote>
<br />
Thanks Michael!
mwilliams
No problem. Let us know whenever you have questions!