Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Creating a custom Datasource
Creating a custom Datasource [message #500439] Thu, 26 November 2009 08:22 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Hello,

I want to have the BIRT Designer use a custom datasource.
For the BIRT Engine I made BIRT use my own Datasource using the 'org.eclipse.datatools.connectivity.oda.consumer.driverBridg e' and 'org.eclipse.datatools.connectivity.oda.dataSource' extension points. This works perfectly nice!
Now I want to have in the 'New Datasource Dialog' my own datasource listet for selection (when creating a new datasource for a report for instance, see attached image).
How can this be done? Whan extensionpoints Do I have to use?

Thanks,
Jan
Re: Creating a custom Datasource [message #501002 is a reply to message #500439] Mon, 30 November 2009 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jan,

The bridge is used to intercept calls from a oda and the
org.eclipse.datatools.connectivity.oda.dataSource extension point is the
runtime portion of an oda.

You need to implement the
org.eclipse.datatools.connectivity.oda.design.ui.dataSource
extension point for the gui part. Take a look at the oda articles on
birt-exchange.org
http://www.birt-exchange.org/devshare/designing-birt-reports /445-oda-primer-articles/#description

Jason

Jan Kohnert wrote:
> Hello,
>
> I want to have the BIRT Designer use a custom datasource. For the BIRT
> Engine I made BIRT use my own Datasource using the
> 'org.eclipse.datatools.connectivity.oda.consumer.driverBridg e' and
> 'org.eclipse.datatools.connectivity.oda.dataSource' extension points.
> This works perfectly nice!
> Now I want to have in the 'New Datasource Dialog' my own datasource
> listet for selection (when creating a new datasource for a report for
> instance, see attached image).
> How can this be done? Whan extensionpoints Do I have to use?
>
> Thanks,
> Jan
Re: Creating a custom Datasource [message #501158 is a reply to message #500439] Tue, 01 December 2009 11:10 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Thank you for that articles Jason!

I read some pages and came to the point of having a Google spreadsheet data source. It seemed like I have to implement my own data sets in order to get the source run!?

In my situation I don't have a new type of data source. All I want is to wrap a JDBC connection and make it selectable in a dialog. The report designer shouldn't be bothered by JDBS connection details. Having a Data source saying "Company XYZ Data source" for selecting would be the best.

This is a reason why I'm using the bridge. I've a connection pool that is used for all DB connections from within my application. And of cause I want BIRT to use that pool too Smile (Actually the engine Part is already successfully using it)

After reading parts of your articles I'm not quite sure if this can be done by defining a new data source without having to implement the data set stuff too, what would be a bit to much overhead in my eyes.

Off cause by writing this in this situation I'm hoping for you saying something like that it can be done twisting things a bit here and there .. 

Thanks again,
Jan

Re: Creating a custom Datasource [message #501213 is a reply to message #501158] Tue, 01 December 2009 14:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jan,

If you are looking to just extend the jdbc plugin, so your oda shows up
in the plugin, take a look at the sampledb driver plugins.
org.eclipse.birt.report.data.oda.sampledb.ui - for the ui and
org.eclipse.birt.report.data.oda.sampledb - for the runtime driver.

This driver just extends the jdbc oda and can be checked out of cvs.

Jason

Jan Kohnert wrote:
> Thank you for that articles Jason!
>
> I read some pages and came to the point of having a Google spreadsheet
> data source. It seemed like I have to implement my own data sets in
> order to get the source run!?
> In my situation I don't have a new type of data source. All I want is to
> wrap a JDBC connection and make it selectable in a dialog. The report
> designer shouldn't be bothered by JDBS connection details. Having a Data
> source saying "Company XYZ Data source" for selecting would be the best.
>
> This is a reason why I'm using the bridge. I've a connection pool that
> is used for all DB connections from within my application. And of cause
> I want BIRT to use that pool too :) (Actually the engine Part is already
> successfully using it)
>
> After reading parts of your articles I'm not quite sure if this can be
> done by defining a new data source without having to implement the data
> set stuff too, what would be a bit to much overhead in my eyes.
>
> Off cause by writing this in this situation I'm hoping for you saying
> something like that it can be done twisting things a bit here and there
> .. 
>
> Thanks again,
> Jan
>
>
Re: Creating a custom Datasource [message #501240 is a reply to message #501213] Tue, 01 December 2009 16:04 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
It seems I've bad look with this topic. The CVS server is not available as described here:
http://www.eclipse.org/birt/phoenix/build/buildInstructions. php#config

I'm just getting an exception when trying to connect:
Could not connect to :pserver:anonymous@dev.eclipse.org:cvsroot/birt: I/O exception occurred: Connection refused: cvs [pserver aborted]: cvsroot/birt: no such repository
Connection refused: cvs [pserver aborted]: cvsroot/birt: no such repository

I've your book 'Integrating and Extending BIRT'. Is there any part where extending of the jdbc data source is described?
Re: Creating a custom Datasource [message #501282 is a reply to message #501240] Tue, 01 December 2009 18:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jan,

Try
:pserver:anonymous@dev.eclipse.org:/cvsroot/birt

We currently do not have anything in the book about this, but once you
download the code you will see it is pretty simple. If you need help
send me an email.

Jason

Jan Kohnert wrote:
> It seems I've bad look with this topic. The CVS server is not available
> as described here:
> http://www.eclipse.org/birt/phoenix/build/buildInstructions. php#config
>
> I'm just getting an exception when trying to connect:
> Could not connect to
> :pserver:mailto:anonymous@dev.eclipse.org:cvsroot/birt: I/O exception
> occurred: Connection refused: cvs [pserver aborted]: cvsroot/birt: no
> such repository
> Connection refused: cvs [pserver aborted]: cvsroot/birt: no such repository
>
> I've your book 'Integrating and Extending BIRT'. Is there any part where
> extending of the jdbc data source is described?
>
Re: Creating a custom Datasource [message #501403 is a reply to message #500439] Wed, 02 December 2009 08:29 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Jason,

I can't connect to the CVS Server using you connection string. Normally I'm using SVN, maybe both repositories do not work together for one workspace?
Would it possible to email the plugins to me? If yes my address is
jko[ a t ]swisslab[ d o t ]de

Thank you!
Re: Creating a custom Datasource [message #501532 is a reply to message #501403] Wed, 02 December 2009 16:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jan,

You can download all of the source by downloading the sdk:
http://www.eclipse.org/downloads/download.php?file=/birt/dow nloads/drops/R-R1-2_5_1-200909220630/birt-report-framework-s dk-2_5_1.zip
Unzip these jars
org.eclipse.birt.report.data.oda.sampledb.source_version.jar
org.eclipse.birt.report.data.oda.sampledb.ui.source_version. jar

Jason

Jan Kohnert wrote:
> Jason,
>
> I can't connect to the CVS Server using you connection string. Normally
> I'm using SVN, maybe both repositories do not work together for one
> workspace? Would it possible to email the plugins to me? If yes my
> address is
> jko[ a t ]swisslab[ d o t ]de
>
> Thank you!
>
Re: Creating a custom Datasource [message #501896 is a reply to message #500439] Fri, 04 December 2009 11:07 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Jason,

Thanks to you I'm processing Smile
I can now select my own Data source.

Since the examples you mentioned downloaded from the BIRT SDK does not include the plugin.xml files and proper MANIFEST.MF files it is hard to find out the required dependencies. (I took the plugin.xml from the non source plugin versions, but the MANIFEST.MF files from these versions look a bit strange and do not include any required plugins information...)

I can create a Dataset, but when ever pushing 'Next' after having selected 'SQL Query' in the 'New Data Set' Dialog I'm guarded into a 'Output columns Dialog' instead of the desired 'Query Dialog'.

One more thing that is conspicuous is that the 'Stored Procedure' entry in the 'Data Set Type' drop down list is missing.

Could you please send me the proper MANIFEST.MF files?

Thank you!
Jan
Re: Creating a custom Datasource [message #501923 is a reply to message #500439] Fri, 04 December 2009 13:52 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Jason,

Try 'n' error brought me to the point of beeing half successful.
In SampleDbSelectionPage the getDriverUrl method returns a string representation of the driver class. I'm using a connection bridge. When returning the class name of my Bridges driver class, the class can not be loaded because it can not be seen by the loader (WTP?). When returning the bridge ID loading also fails, because a bridge is not a driver....
How can I define my bridge driver to be used?

Thanks!
Re: Creating a custom Datasource [message #501994 is a reply to message #501923] Fri, 04 December 2009 16:35 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jan,

I am somewhat confused The driver bridge should not be affecting your
ODA at design time, only runtime.

BTW I am sending you the two plugins in email.

Jason

Jan Kohnert wrote:
> Jason,
>
> Try 'n' error brought me to the point of beeing half successful. In
> SampleDbSelectionPage the getDriverUrl method returns a string
> representation of the driver class. I'm using a connection bridge. When
> returning the class name of my Bridges driver class, the class can not
> be loaded because it can not be seen by the loader (WTP?). When
> returning the bridge ID loading also fails, because a bridge is not a
> driver....
> How can I define my bridge driver to be used?
>
> Thanks!
>
Previous Topic:trim white space
Next Topic:How to access Cross Tab cell values?
Goto Forum:
  


Current Time: Sat Apr 27 02:25:20 GMT 2024

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

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

Back to the top