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)
Hidden table still execute sql question ?
Hakan
Hi!
I have just created a new report in which parts of the report needs to be hidden depending on the report parameters. One report item that needs to be hidden is a table that is bound to a specific data set.
But when this table is hidden, the sql query of the bound data set is still sent to the database.
Is there a way of preventing this behaviour ?
Thanks,
H?kan
Find more posts tagged with
Comments
johnw
Give your table a name in the Property Editor.
In the Script Editor for the report, in either the Initialize or Before Factor, use the following script:
if (params["hideMyTable"].value == true)
{
reportContext.getDesignHandle().findElement("TableToDelete").drop();
}
This will remove the table from the design at runtime, preventing it from executing its query.
johnw
Here is an article with an example:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1468-dynamically-hide-table-and-not-execute-its-data-set/
Hakan
Perfect !<br />
This was exactly what I was looking for.<br />
<br />
Thanks a lot!<br />
<br />
H?kan<br />
<br />
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="96572" data-time="1330028786" data-date="23 February 2012 - 01:26 PM"><p>
Here is an article with an example:<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1468-dynamically-hide-table-and-not-execute-its-data-set/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1468-dynamically-hide-table-and-not-execute-its-data-set/</a><br
/></p></blockquote>