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)
Calling global variable on main table doesn't work
AlbertYu
Hi,
Just wondering why my call to a global variable via the command:
reportContext.getPersistentGlobalVariable(BirtStr.concat(row["APP_COMPID"], "deployed"))
does not work.
I have set this global variable on the onCreate script of a sub table's row element script, by the following:
reportContext.setPersistentGlobalVariable(BirtStr.concat(row["APP_COMPID"], "deployed"), "show");
When I try calling this command on a sub-table's column, it works fine.
It just doesn't work when I try calling it on the main table's row.
The sub-tables are linked to the main table through a data set parameter binding - the parameter being Focus_App_CompID and the value being row["APP_COMPID"]
Can anyone help please?
Thank you,
Albert
Find more posts tagged with
Comments
AlbertYu
Hi,
Just wondering why my call to a global variable via the command:
reportContext.getPersistentGlobalVariable(BirtStr.concat(row["APP_COMPID"], "deployed"))
does not work.
I have set this global variable on the onCreate script of a sub table's row element script, by the following:
reportContext.setPersistentGlobalVariable(BirtStr.concat(row["APP_COMPID"], "deployed"), "show");
When I try calling this command on a sub-table's column, it works fine.
It just doesn't work when I try calling it on the main table's row.
The sub-tables are linked to the main table through a data set parameter binding - the parameter being Focus_App_CompID and the value being row["APP_COMPID"]
Can anyone help please?
Thank you,
Albert
mwilliams
If you're trying to grab a global variable that you set in a sub table, in the outer table, you'll have to assign the variable in the onCreate, like you say you did, and you'll have to recall the variable in the onRender of the outer row. This will only work, however, if you're using the web viewer output from the designer, then exporting to your output type of choice or by using the report engine API to run the report with separate run and render tasks. Hope this helps.