Problem with the export of a report with the Birt RE API [message #1066605] |
Wed, 03 July 2013 08:15  |
Eclipse User |
|
|
|
hi everyone,
I'm currently stuck with a problem with my export , and I think i could use some help.
I'm trying to export a rptdesign file with the BIRT REAPI (which was created with the DE API) . I've got the following error :
org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions
GRAVE: An error happened while running the report. Cause:
org.eclipse.birt.report.engine.api.EngineException: Cannot create data engine.
at org.eclipse.birt.report.engine.executor.ExecutionContext.openDataEngine(ExecutionContext.java:890)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
...
Caused by: org.eclipse.birt.core.exception.CoreException: No such script extension : javascript.
However I don't know what's exactly caused this. My wild guess is that my dataset uses a jdbc which is not load in the report design because when i open the report i have to manage manually the driver. This is my code to create my Dataset
String nameDataSet = "ExecutionSucessError";
String query= "select public.activity.echec, public.activity.success, public.activity.dates from public.activity";
OdaDataSetHandle odaDataSetHandle =
designFactory.newOdaDataSet(nameDataSet ,
"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet");
odaDataSetHandle.setDataSource(nomSourceDeDonnees);
odaDataSetHandle.setQueryText(query);
designHandle.getDataSets().add(odaDataSetHandle);
My code with the RE API to export is :
IReportRunnable design = engine.openReportDesign(PathRpdesignFile);
IRunTask runTask = engine.createRunTask(design);
runTask.setLocale(lang);
runTask.run(pathRpDocument);
IReportDocument doc = engine.openReportDocument(pathRpDocument);
IRenderTask renderTask = engine.createRenderTask(doc);
option.setOutputFileName(pathOutPutFile);
option.setOutputFormat(format);
renderTask.setRenderOption(option);
renderTask.render();
If somebody can enlighten me for this problem
Regards,
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05381 seconds