Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
How to integrate new emitter during runtime?
Migrateduser
<p>I wrote my emitter ("MyEmitter") for Birt. No problems with launching it as Elcipse Application (plugin project) - I have new report viewing option, it starts and acts fine. </p><p>But, when I try to use it in my code - Birt Runtime has no ideas about my extension:</p><pre class="_prettyXprint _lang-"> EngineConfig config = new EngineConfig(); config.setLogConfig("c:/temp/birt.log", Level.FINE); Platform.startup(config); IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); IReportEngine engine = factory.createReportEngine(config); engine.changeLogLevel(Level.WARNING); IReportRunnable design = engine.openReportDesign("test.rptdesign"); IRunAndRenderTask task = engine.createRunAndRenderTask(design); IRenderOption options = new RenderOption(); options.setOutputFormat("MyFormat"); options.setOutputFileName("c:/temp/result.MyFormat"); options.setEmitterID("MyEmitter"); task.setRenderOption(options); task.setEmitterID("MyEmitter"); task.run(); task.close(); engine.destroy(); Platform.shutdown();</pre><p>This fails with "unknown emitterID exception". How should I register my emitter during runtime ? </p><p> </p><p>Offline it's "easy": I go to org.eclipse.birt.runtime.4.3.1.jar in my local repository, unzip it, modify plugin.xml (add MyEmitter extension to org.eclipse.birt.emitters point). Then clear signatures in META-INF/MANIFEST.MF for plugin.xml, delete few files with signatures. Repack back to jar. That's it, now my code (see above) finally works.</p><p>Little bit tricky and perverted, is it any convenient way to cope with my task? </p><p>May be - some EngineConfig options? </p><p>Any help will be appreciated. </p><p> </p><p> </p><p> </p>
Find more posts tagged with
Comments
There are no comments yet