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)
suppress tables based on records in first table
HSMorales
I have a report with 4 tables. each table is binded to different datasets. The first table has a computed column called ROW_COUNT to count the number of rows returned. If ROW_COUNT = 0 the table is suppressed and a message is displayed. I would like to use ROW_COUNT to suppress the other 3 tables if the first table is suppressed. Is there a way I can do this? How can I assign ROW_COUNT to a variable that I can use for the visibility option of the other 3 tables ?? Thanks I am running BIRT 3.7.0
Find more posts tagged with
Comments
Tubal
The easiest way would probably be to embed the last 3 tables within the footer of the first table. That way if the first table was hidden, the three tables within it would also be hidden.<br />
<br />
If this won't work, another way to do it would be to assign the value of your rowcount binding to a global variable in the first table's onRender script.<br />
<br />
Something like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.setGlobalVariable("firstRows",dataSetRow["ROW_COUNT"]);</pre>
<br />
then in your visibility script for the other three tables, you'd put something like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getGlobalVariable("firstRows") < 1;</pre>
HSMorales
Thanks. I went ahead and imbedded the tables in the footer of the first table and it does what I need it to do.