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)
GLOBAL VARIABLES
arunkumarb
Hi Everyone,
Can we declare Global variables, which we can use in Expression Builder?
Regards,
Arun
Find more posts tagged with
Comments
jhelbling
<blockquote class='ipsBlockquote' data-author="'arunkumarb'" data-cid="92950" data-time="1325244732" data-date="30 December 2011 - 04:32 AM"><p>
Hi Everyone,<br />
Can we declare Global variables, which we can use in Expression Builder?<br />
<br />
Regards,<br />
Arun<br /></p></blockquote>
<br />
Hi Arun,<br />
<br />
You should be able to use the following in the beforeFactory() event :<br />
<br />
reportContext.setGlobalVariable("var",0);<br />
<br />
Hope it helps.
johnw
Yes. There are two ways of doing it. You can declare a variable normally in the initialize event for a report. This will keep it at a global report scope.
The second, and preferred way, is to use the reportContext.setGlobalVariable()/reportContext.getGlobalVariable() methods, which are available anywhere in a event handler or expression builder.
The third way is to use the vars[] array that is accessible in the Data Explorer.