|
|
Re: Set a global variable using report parameter [message #821037 is a reply to message #820661] |
Wed, 14 March 2012 21:35 |
|
The beforeFactory is ideal. Are you setting global variable like:
setPersistentGlobalVariable or using setGlobalVariable?
the get must match.
Jason
On 3/14/2012 8:03 AM, ing omini wrote:
> I want to read a report parameter and, basing on its value, create some
> derived variables to be put in the report context:
>
> reportContext.setGlobalVariable("global_refdate", params["refdate"].value);
>
> The final goal is to use these variables inside dynamic text elements,
> report header/footer, ...
>
> The problem is that I can't understand where to put the script, because
> I don't know when the parameter is evaluated (and not null) during the
> report generation.
>
> I've put it in many event handler scripts of the report element:
>
> initialize
> before factory
> after factory
>
> but the global variable is always null when I'm trying to use it with:
>
> reportContext.getPersistentGlobalVariable("global_refdate");
>
>
> Can someone help me, please?
> Thanks in advance...
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03532 seconds