Skip to main content



      Home
Home » Archived » BIRT » getting Data Element value in onCreate event(getting Data Element value in onCreate event and assign to a global variable)
getting Data Element value in onCreate event [message #777893] Wed, 11 January 2012 00:49 Go to next message
Eclipse UserFriend
Hi All,

I am new to Eclipse BIRT. I want to get the data element value in onCreate event of this element and assign to a global variable. Also i would like to access the value of this global variable in beforeRender event of the Report.

I have tried several ways but no luck.

Please help me out.

Thanks & Regards
Madhan
Re: getting Data Element value in onCreate event [message #778400 is a reply to message #777893] Wed, 11 January 2012 12:31 Go to previous message
Eclipse UserFriend
If you are previewing in the designer the beforeRender event will fire
before the oncreate events for data elements. If you preview using the
web viewer it will fire like you want it to. In the oncreate use:

reportContext.setGlobalVariable("myvar",this.getValue());
or
reportContext.setPersistentGlobalVariable("myvar",this.getValue());

and in the beforeRendering

var tst = reportContext.getGlobalVariable("myvar");
or
var tst = reportContext.getPersistentGlobalVariable("myvar");

See :
http://www.eclipse.org/birt/phoenix/deploy/reportScripting.php

for details on event order.

Jason


On 1/11/2012 12:49 AM, Madhana Gopal wrote:
> Hi All,
>
> I am new to Eclipse BIRT. I want to get the data element value in
> onCreate event of this element and assign to a global variable. Also i
> would like to access the value of this global variable in beforeRender
> event of the Report.
>
> I have tried several ways but no luck.
>
> Please help me out.
>
> Thanks & Regards
> Madhan
Previous Topic:Dynamic watermarks using parameters
Next Topic:Text Overflow to another cell
Goto Forum:
  


Current Time: Wed Jul 23 13:49:53 EDT 2025

Powered by FUDForum. Page generated in 0.03240 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top