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)
Can't work the visibility property correctly
AlbertYu
Hello,
In a report my team is developing, we have created a script (onCreate) on a table's row element; the table of which is within a column of another table (let's call this one the outer table). Let's call the prior one the inner table.
The script generates values for a global boolean variable (called ShowRowVar), of which its values are true or false, depending on the data on the current row of the inner table.
I would like to configure my report so that the outer table only outputs a particular row when ShowRowVar is true.
I have tried using the visiblity property of the outer table row element - I set the conditional expression to:
reportContext.getGlobalVariable("ShowRowVar")==false
But this doesn't work. The results of the report shows everything (even those which ShowRowVar == false).
Can anyone help please?
Regards,
Albert
Find more posts tagged with
Comments
mwilliams
So, you want to hide a group in the outer table when the inner table doesn't have values? Is this correct? If so, what is your BIRT version? I might have an example for this somewhere. Let me know.
AlbertYu
I want to hide a row element of the outer table when the inner table's row element script (onCreate) generates ShowRowVar==false. Can you help out? Thanks.
mwilliams
What is your BIRT version?
AlbertYu
I found 2:
In the .eclipseproduct file in my BIRT directory, it says:
#Eclipse Product File
#Wed Jun 17 07:04:57 CST 2009
version=2.5.0.v20090604
name=%ApplicationName
id=org.eclipse.birt.report.designer.ui.rcp.BIRT
And in preferences->Report design->Template->Template folder:
C:\BIRT\plugins\org.eclipse.birt.resources_2.5.0.v20090616\custom-templates
Please let me know if these aren't it.
Regards,
Albert
mwilliams
Nope, that's it. You have version 2.5.0. I'll work on a quick example and get back to you.
mwilliams
Take a look at this report. In the onCreate of the inner table, a persistent global variable(pgv), named for the outer row value, is assigned a value if the inner table meets the criteria. In the onRender of the outer table, the pgv associated with that row is called. If it's null, the row is hidden. Those rows that have a value assigned to their variable are still shown. Be sure to run it in the web viewer so that the run and render tasks are ran separately. Let me know if you have questions.