[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [birt-dev] How to create a datasource
|
Hi Yu Li,
Yes, I did that but i dont know why the extension is not found.
I dont know if i need to configure something. I use the runtime libraries.
You can help me ?
I have this class,
SessionHandle session = DesignEngine.newSession(null);
ReportDesignHandle design = session.createDesign();
ElementFactory factory = design.getElementFactory();
OdaDataSourceHandle dataSource =
factory.newOdaDataSource("dataSource","org.eclipse.birt.report.data.oda.jdbc");
dataSource .setBeforeOpen("extensionProperties.odaUser = \"\";" +
"extensionProperties.odaPassword = \"\";" +
"extensionProperties.odaURL = \"jdbc:mysql://Andres1:3306/hermes1\";" +
"extensionProperties.odaDriverClass = \"com.mysql.jdbc.Driver\";");
OdaDataSetHandle dataSetHandle = factory.newOdaDataSet("Conexiones");
dataSetHandle.setProperty(OdaDataSetHandle.QUERY_TEXT_PROP,
"select code, desc from departament");
....
I run this class when i an exception is throwed.
java.lang.IllegalArgumentException: org.eclipse.birt.report.data.oda.jdbc
at
org.eclipse.birt.data.oda.util.manifest.ManifestExplorer.getExtensionManifest(ManifestExplorer.java:141)
at
org.eclipse.birt.report.model.extension.oda.ODAManifestUtil.getDataSourceExtension(ODAManifestUtil.java:33)
at
org.eclipse.birt.report.model.api.ElementFactory.newOdaDataSource(ElementFactory.java:731)
at org.eclipse.org.demo.de.DeDemo.buildReport(DeDemo.java:74)
at org.eclipse.org.demo.de.DeDemo.main(DeDemo.java:46)
Or sometimes when i pass only one parameter in the datasource, the
extensionID is not generated.
What can i do, Can you give me an example where you can generate a report
using jdbc?
Please.
Thanks for your help.
From: "Yu Li" <yli@xxxxxxxxxxx>
Reply-To: For developers on the BIRT project <birt-dev@xxxxxxxxxxx>
To: "For developers on the BIRT project" <birt-dev@xxxxxxxxxxx>
Subject: RE: [birt-dev] How to create a datasource
Date: Sun, 10 Jul 2005 19:14:58 -0700
Hi,
You need to create an oda-data-source. We have jdbc data source oda
extension plugin that you can use.
ElementFactory :: newOdaDataSource("youDataSourceName",
"org.eclipse.birt.report.data.oda.jdbc");
Then you will get the OdaSourceHandle and set the properties.
Thanks!
Ivy
Actuate Software ShangHai center.
498 Guoshoujing Rd.Bld 3.Suite 3301. shanghai,201203
Tel: (86)21-50270900 ext:257
Fax:(86)21-50270901
Email: yli@xxxxxxxxxxx
-----Original Message-----
From: birt-dev-bounces@xxxxxxxxxxx [mailto:birt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Andres Felipe Gomez Mondragon
Sent: Sunday, July 10, 2005 3:23 AM
To: birt-dev@xxxxxxxxxxx
Subject: [birt-dev] How to create a datasource
Hello, I need your help.
I need to create a datasource using java code but i dont know how to write
the datasource with the properties like driverclass, url, user, password
and the metadata with a query like "select code, description from
conexion".
After the results i´ll show in a table.
Thanks.
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
_______________________________________________
birt-dev mailing list
birt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/birt-dev
_______________________________________________
birt-dev mailing list
birt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/birt-dev
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/