Problems using BIRT in a RCP Application [message #94474] |
Fri, 25 November 2005 12:11 |
Eclipse User |
|
|
|
Originally posted by: riccar.catt.tin.it
Hi,
I am using BIRT 1.0.1; my environment is:
Eclipse 3.1.1
JDK 5.0
GEF 3.1.0
EMF 2.1.0
OS Windows XP
I created an Eclipse project from 'Example application' of the
'Integrating BIRT' tutorial, using RunReport to create my report
elencoClienti.pdf.
It works OK stand alone.
I then tried to inbed the code into a Plugin project, to create a RCP
application.
From a Dialog with two text controls (tCodiceIniziale and tCodiceFinale),
the method okPressed calls RunReport:
public void okPressed() {
rr = new RunReport();
args = new String[4];
args[0] = "workspace\\myPackage\\elencoClienti.rptdesign";
args[1] = "-p";
args[2] = "codiceIniziale=" + tCodiceIniziale.getText();
args[3] = "codiceFinale=" + tCodiceFinale.getText();
try {
rr.main(args);
} catch (Exception e) {
System.out.println("Errore nella generazione del report: " + e);
}
}
When I run the product (as Eclipse Application) and press the okButton, I
get this error:
java.lang.ClassCastException:
org.eclipse.birt.chart.reportitem.ChartReportItemFactoryImpl ,
then:
Report engine can not create pdf emitter.
I tried also to call RunReport.run method:
public void okPressed() {
rr = new RunReport();
reportName = new String("workspace\\myPackage\\elencoClienti.rptdesign");
format = new String(HTMLRenderOption.OUTPUT_FORMAT_HTML);
params = new HashMap( );
params.put( "codiceIniziale", tCodiceIniziale.getText() );
params.put( "codiceFinale", tCodiceFinale.getText() );
try {
rr.run(reportName, params, format, false);
} catch (Exception e) {
System.out.println("Errore nella generazione del report: " + e);
}
}
but I got the same error.
When I use RunReport as Java Application from my Plugin project, it work
ok.
All the required jars are in the Java build path Library.
Could someone explain what is wrong?
Thanks and Regards
Riccardo Cattania
|
|
|
Powered by
FUDForum. Page generated in 0.03119 seconds