Bonjour à tous,
Je suis nouvelle sur le forum ET sur Birt. J'ai commencé à m'en servir que récemment et là, je me prend un peu la tete avec le Report Engine : j'ai une exception qui se lance à mon task.run() et j'arrive pas à résoudre le problème ! Je croyais bien avoir suivi les tutoriaux...
J'ai fait des recherches google pour voir ce qu'il y avait sur le sujet mais rien trouvé
Quelqu'un a une idée ??
Voici un bout du code
Voilà mon exception
Code : 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74 public class Test1_html { static void excecuteReport() throws EngineException{ ... try { Class.forName("org.postgresql.Driver"); db= DriverManager.getConnection(dbUrl, user, passwd); config = new EngineConfig( ); config.setEngineHome(enginePath); config.setLogConfig(logConfig, Level.FINE); Platform.startup( config ); IReportEngineFactory factory = (IReportEngineFactory) Platform .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY ); engine = factory.createReportEngine( config ); engine.changeLogLevel(Level.WARNING ); } catch (ClassNotFoundException e) { System.err.println("Je trouve pas le driver"); } catch (Exception e) { e.printStackTrace(); } //Open the report design try { design = engine.openReportDesign(rptdesign); } catch (EngineException e) { System.out.println("........PB" + e.getMessage()); } task = engine.createRunAndRenderTask(design); contextMap = new HashMap(); contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,renderContext ); task.setAppContext( contextMap ); options = new HTMLRenderOption(); options.setOutputFormat("html"); options.setOutputFileName(outputFile); task.setRenderOption(options); try { task.run(); } catch (EngineException e) { //System.out.println("### Génération du fichier echouée ###\n" + e.getMessage()); } ... } public static void main(String[] args){ try { excecuteReport( ); } catch ( Exception e ) { e.printStackTrace(); } } }
org.eclipse.birt.report.engine.api.EngineException: Some required parameter values are not set or set to incompatible data type.
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:155)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:142)
at Report_Engine.Test1_html.excecuteReport(Test1_html.java:107)
at Report_Engine.Test1_html.main(Test1_html.java:126)
Partager