Skip to main content



      Home
Home » Archived » BIRT » Problems using BIRT in a RCP Application
Problems using BIRT in a RCP Application [message #94474] Fri, 25 November 2005 12:11
Eclipse UserFriend
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
Previous Topic:IRC channel
Next Topic:.tmp files with Tomcat
Goto Forum:
  


Current Time: Sun May 11 15:37:58 EDT 2025

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

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

Back to the top