Skip to main content



      Home
Home » Archived » BIRT » How to retrieve an IReportContext from the API using a RunAndRenderTask?
How to retrieve an IReportContext from the API using a RunAndRenderTask? [message #252497] Wed, 15 August 2007 06:31 Go to next message
Eclipse UserFriend
Originally posted by: Nobert.aol.com

Hi,
I have to set a value using the
IReportContext.setPersistenGlobalVariable(..), but it seems not to be
possible to retrieve this object using the API. Due to project specific
reasons, I can not set the variable from within an internal script of the
report (e.g. "beforeOpen"), it has to be set from external using the API.

Several days of exploring the source gave no reasonable result...

Any help will be highly appreciated

Norbert
Re: How to retrieve an IReportContext from the API using a RunAndRenderTask? [message #252583 is a reply to message #252497] Wed, 15 August 2007 15:07 Go to previous messageGo to next message
Eclipse UserFriend
Did you check the method IEngineTask.setAppContext(java.util.Map context)?
You can provide arbitrary Java Objects to the task via the context map and
read them in report scripts with
"reportContext.getAppContext().get(yourKey);" and then set it as a
persistent global variable (if this is still necessary).

Spunk

"Norbert" <Nobert@aol.com> schrieb im Newsbeitrag
news:f9ukm4$snb$1@build.eclipse.org...
> Hi,
> I have to set a value using the
> IReportContext.setPersistenGlobalVariable(..), but it seems not to be
> possible to retrieve this object using the API. Due to project specific
> reasons, I can not set the variable from within an internal script of the
> report (e.g. "beforeOpen"), it has to be set from external using the API.
>
> Several days of exploring the source gave no reasonable result...
>
> Any help will be highly appreciated
>
> Norbert
>
Re: How to retrieve an IReportContext from the API using a RunAndRenderTask? [message #252713 is a reply to message #252583] Thu, 16 August 2007 04:13 Go to previous message
Eclipse UserFriend
Originally posted by: Nobert.aol.com

Yes I've checked that, but it did'nt work in this way.
Those values were set according to the "setGlobalVariable()" rule,
which is nice, but not "persistent" (what means, they are valid during
both "run" and "render" phase).

Sorry for the lack of information: I'm using the 2.2 API

A chance to access the IReportContext would help (and would be convienient
even for some other tasks...)

Regards
Norbert


"Der Spunk" <spunk_der@hotmail.com> schrieb im Newsbeitrag
news:f9vjdc$5oc$1@build.eclipse.org...
> Did you check the method IEngineTask.setAppContext(java.util.Map context)?
> You can provide arbitrary Java Objects to the task via the context map and
> read them in report scripts with
> "reportContext.getAppContext().get(yourKey);" and then set it as a
> persistent global variable (if this is still necessary).
>
> Spunk
>
> "Norbert" <Nobert@aol.com> schrieb im Newsbeitrag
> news:f9ukm4$snb$1@build.eclipse.org...
>> Hi,
>> I have to set a value using the
>> IReportContext.setPersistenGlobalVariable(..), but it seems not to be
>> possible to retrieve this object using the API. Due to project specific
>> reasons, I can not set the variable from within an internal script of the
>> report (e.g. "beforeOpen"), it has to be set from external using the API.
>>
>> Several days of exploring the source gave no reasonable result...
>>
>> Any help will be highly appreciated
>>
>> Norbert
>>
>
>
Previous Topic:"Illegal class loader binding" when starting WebViewer
Next Topic:Large number of tables in data set/query designer
Goto Forum:
  


Current Time: Fri Aug 08 07:53:58 EDT 2025

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

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

Back to the top