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)
Passing event handler through report context
littleoak
<p>Hi,</p>
<p> </p>
<p>please is it possible to pass an (data set) event handler in another way then hardcoding its class name name into report design? For example passing it through report context?</p>
<p> </p>
<p>Because I use one version of event handler in my rcp application (using scripted data set, without direct database connection) and another version in rcp report designer's preview. (Context is set up by "org.eclipse.birt.report.viewer.appcontext" extension point)</p>
<p> </p>
<p>Thanks a lot.</p>
<p> </p>
<p>OD.</p>
Find more posts tagged with
Comments
mwilliams
Are you wanting to know how you can set the value through script?<br><br>If you're wanting to set the event handler of a data set through script, you should be able to do something like this in the beforeFactory method of the report:<br><br><pre class="_prettyXprint _lang-auto _linenums:0">
reportContext.getDesignHandle().findDataSet("DataSetName").setStringProperty("eventHandlerClass","yourEventHandlerClass")
</pre>
littleoak
<p>Hello Michael,</p>
<p> </p>
<p>the proposed beforeFactory() method works, thanks a lot!</p>
<p> </p>
<p>Regards,</p>
<p> </p>
<p>Ondrej. </p>
mwilliams
You're very welcome! Let us know whenever you have questions!