Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problem with the export of a report with the Birt RE API
Problem with the export of a report with the Birt RE API [message #1066605] Wed, 03 July 2013 12:15 Go to next message
werner heisenberg is currently offline werner heisenbergFriend
Messages: 3
Registered: June 2013
Junior Member
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,
Re: Problem with the export of a report with the Birt RE API [message #1067106 is a reply to message #1066605] Fri, 05 July 2013 21:27 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher ClarkFriend
Messages: 130
Registered: January 2013
Senior Member
This thread suggest you might be missing org.eclipse.birt.report.engine.script.javascript from you application/project. Can you verify this is in your classpath and add it if it's not?
Re: Problem with the export of a report with the Birt RE API [message #1067510 is a reply to message #1067106] Tue, 09 July 2013 07:54 Go to previous message
werner heisenberg is currently offline werner heisenbergFriend
Messages: 3
Registered: June 2013
Junior Member
Thanks for your reply Kristopher,
yes, i forgot this dependence it has solved the problem, thanks a lot !
Previous Topic:Overflowing table in fixed layout
Next Topic:List of Jars needed for generating a PDF document using BIRT
Goto Forum:
  


Current Time: Mon Aug 26 00:10:16 GMT 2019

Powered by FUDForum. Page generated in 0.01998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top