ReportEngine error Help please
Hi guys
Im very new to Birt and have managed to grasp the building and previewing of reports, i now have tryed to call my report from a new application and seem to be getting a null pointer exception...
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:794)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:105)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
at a.executeReport.executeReporta(executeReport.java:38)
at a.aa.main(aa.java:8)
The code i have is as follows:
public static void executeReporta() throws EngineException
{
IReportEngine engine=null;
EngineConfig config = null;
try{
config = new EngineConfig( );
config.setBIRTHome("C:\\development\\birt-runtime-2_3_2\\ReportEngine");
config.setLogConfig(null, Level.FINEST);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("myreport.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("Parmdisp.html");
options.setOutputFormat("html");
task.setRenderOption(options);
task.run();
task.close();
engine.destroy();
}catch( Exception ex){
ex.printStackTrace();
}
finally
{
Platform.shutdown( );
}
Im not sure if its a class / jar error but i have download and set my build path correctly??
Any help would be very much appricated..
Thanks for you time
Nick
|