birt的有关问题,哪位高手能解答
birt的问题,谁能解答
我在应用程序中想调用显示用birt已经做好的报表yb.rptdesign,在打*号的那行老是报错:(2007-7-19 19:44:12 org.eclipse.birt.report.data.oda.sampledb.SampledbPlugin start
信息: Sampledb plugin starts up. Current startCount=0
2007-7-19 19:44:12 org.eclipse.birt.report.data.oda.sampledb.SampledbPlugin init
信息: Creating Sampledb database at location C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\/BIRTSampleDB_1184845452375_17200b4
Exception in thread "main " java.lang.NoClassDefFoundError: org/mozilla/javascript/Scriptable
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:13)
at ln.buildreport(ln.java:3599)))
程序函数代码如下:
public void buildreport(){
try{
EngineConfig config = new EngineConfig();
config.setEngineHome( "E:/javaa/workspace/static/birtruntime/birt-runtime-2_2_0/ReportEngine ");
config.setLogConfig( "E:/javaa/workspace/static/birtruntime/temp ",Level.FINE);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
******************engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.WARNING);
IReportRunnable design=engine.openReportDesign( "E:/javaa/workspace/static/yb.rptdesign ");
IRunAndRenderTask task=engine.createRunAndRenderTask(design);
//设置报表显示的上下文,处理URL和图像定位
//HTMLRenderContext renderContext=new HTMLRenderContext();
//renderContext.setImageDirectory( "image ");
//HashMap contextMap=new HashMap();
// contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,renderContext);
//task.setAppContext(contextMap);
//设置显示选项和输出格式
HTMLRenderOption options=new HTMLRenderOption();
options.setOutputFileName( "pfileter.html ");
options.setOutputFormat( "html ");
task.setRenderOption(options);
task.run();
}catch( Exception ex){
ex.printStackTrace();
我在应用程序中想调用显示用birt已经做好的报表yb.rptdesign,在打*号的那行老是报错:(2007-7-19 19:44:12 org.eclipse.birt.report.data.oda.sampledb.SampledbPlugin start
信息: Sampledb plugin starts up. Current startCount=0
2007-7-19 19:44:12 org.eclipse.birt.report.data.oda.sampledb.SampledbPlugin init
信息: Creating Sampledb database at location C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\/BIRTSampleDB_1184845452375_17200b4
Exception in thread "main " java.lang.NoClassDefFoundError: org/mozilla/javascript/Scriptable
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:13)
at ln.buildreport(ln.java:3599)))
程序函数代码如下:
public void buildreport(){
try{
EngineConfig config = new EngineConfig();
config.setEngineHome( "E:/javaa/workspace/static/birtruntime/birt-runtime-2_2_0/ReportEngine ");
config.setLogConfig( "E:/javaa/workspace/static/birtruntime/temp ",Level.FINE);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
******************engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.WARNING);
IReportRunnable design=engine.openReportDesign( "E:/javaa/workspace/static/yb.rptdesign ");
IRunAndRenderTask task=engine.createRunAndRenderTask(design);
//设置报表显示的上下文,处理URL和图像定位
//HTMLRenderContext renderContext=new HTMLRenderContext();
//renderContext.setImageDirectory( "image ");
//HashMap contextMap=new HashMap();
// contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,renderContext);
//task.setAppContext(contextMap);
//设置显示选项和输出格式
HTMLRenderOption options=new HTMLRenderOption();
options.setOutputFileName( "pfileter.html ");
options.setOutputFormat( "html ");
task.setRenderOption(options);
task.run();
}catch( Exception ex){
ex.printStackTrace();