Bonjour,
J'ai créé la classe suivante à partir du code que tu as fourni BiM.
Cependant j'ai l'erreur suivante:
J'ai téléchargé et décompressé BIRT runtime et inclu les librairies suivantes:The type org.eclipse.birt.core.exception.BirtException cannot be resolved. It is indirectly referenced from required .class files BirtReportGenerator/Execution Execution.java line 0 1169543455724 4391
-chartengineapi.jar
-engienapi.jar
Code java : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 package Execution; import org.eclipse.birt.report.engine.api.EngineConfig; import org.eclipse.birt.report.engine.api.IReportRunnable; import org.eclipse.birt.report.engine.api.ReportEngine; import org.eclipse.birt.report.engine.api.RenderOptionBase; import org.eclipse.birt.report.engine.api.EngineException; public class Execution { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub /* Partie initialisation */ EngineConfig engineConfig = new EngineConfig(); engineConfig.setEngineHome("Chemin A"); ReportEngine engine = new ReportEngine(engineConfig); IReportRunnable design = null; RenderOptionBase option = new RenderOptionBase(); option.setOutputFormat(RenderOptionBase.OUTPUT_FORMAT_PDF); //Format du fichier de sortie /* Fin initialisation */ /* Préparation de l'édition */ try { design = engine.openReportDesign("Chemin B"); } catch (EngineException e) { e.printStackTrace(); } IRunAndRenderTask task = engine.createRunAndRenderTask(design); /* Fin de la préparation */ /* Création PDF */ option.setOutputFileName("Chemin C"); //Nom du fichier de sortie task.setRenderOption(option); //Chargement du fichier /* Fin création PDF */ task.run(); //Déclenchement de l'édition //Chemin A ="C:/birt-runtime-2_0_1/Report Engine"; } }
Une idée sur l'origine du problème?
Partager