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)
ResourceLocator / IreportdesignSource
ThomasPz
<p>Hello,</p>
<p> </p>
<p>when starting up birt, I can set an IResourceLocator to the EngineConfig when calling Platform.startup and getting Reportengine. I reuse the IReportEngine for every RenderTask.</p>
<p>In the IResourceLocator I have implemented a special Resource loading for my purpose.</p>
<p>I need to parametrized this IReportDesignSource for every RenderTask.</p>
<p>Is it possible to set a IResourceLocator for every RenderTask? Or is there a way to pass parameters to the rendertask which I can lookup in the IResourceLocator?</p>
<p> </p>
<p>sample; (reduce to the min.)</p>
<pre class="_prettyXprint">
IResourceLocator locator = new (...)
EngineConfig config = new EngineConfig();
config.setResourceLocator(locator);
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine repEngine = factory.createReportEngine(config);
[...]
IReportRunnable repRunnable = engine.openReportDesign( Reportdesign as ByteArray );
IRunAndRenderTask task = engine.createRunAndRenderTask( repRunable );
[...]
task.run()
</pre>
Find more posts tagged with
Comments
donino
<p>This is not an option of a renderTask however we can set a custom <span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;">IResourceLocator</span> each time we <a data-ipb='nomediaparse' href='
http://help.eclipse.org/juno/topic/org.eclipse.birt.doc.isv/engine/api/org/eclipse/birt/report/engine/api/IReportEngine.html#openReportDesign(java.lang.String, org.eclipse.birt.report.model.api.IResourceLocator)'>open
a reportdesign</a>, and / or each time we open a .rptdocument. This should meet your requirements </p>