Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Datasource Definition / JNDI
Datasource Definition / JNDI [message #250517] Tue, 31 July 2007 09:38 Go to next message
Anette Engel is currently offline Anette EngelFriend
Messages: 24
Registered: July 2009
Junior Member
I am currently evaluating BIRT as reporting tool for my company. In my
example reports I am using JDBC connections. I am not particular happy
with this as the connection information is stored in the report design
(*.rptdesign). Example:

<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.6"
id="1">
:
:
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
name="MyDataSource" id="4">
<property
name="odaDriverClass">net.sourceforge.jtds.jdbc.Driver</property >
<property
name="odaURL">jdbc:jtds:sqlserver://mydbserver:1433/MyDatabase;tds=8.0;lastupdatecount=true</property>
<property name="odaUser">username</property>
<encrypted-property name="odaPassword">encrypted
password<encrypted-property>
</oda-data-source>
</data-sources>
:
:
</report>

I don’t particular like this, as it would mean that I have to amend the
report design before deploying them to my live environment. Is there a way
how to avoid this? My reports will be integrated within a web application,
which will be deployed on JBoss AS. My preferred option would be to create
a JDBC datasource on the AS level and use the JNDI name of my datasource
within the report. Is this possible?

Thanks,

Anette
Re: Datasource Definition / JNDI [message #250527 is a reply to message #250517] Tue, 31 July 2007 10:00 Go to previous messageGo to next message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Anette Engel ha scritto:
> I am currently evaluating BIRT as reporting tool for my company. In my
> example reports I am using JDBC connections. I am not particular happy
> with this as the connection information is stored in the report design
> (*.rptdesign). Example:
>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.6"
> id="1">
> :
> :
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MyDataSource" id="4">
> <property
> name="odaDriverClass">net.sourceforge.jtds.jdbc.Driver</property >
> <property
> name="odaURL">jdbc:jtds:sqlserver://mydbserver:1433/MyDatabase;tds=8.0;lastupdatecount=true</property>
>
> <property name="odaUser">username</property>
> <encrypted-property name="odaPassword">encrypted
> password<encrypted-property>
> </oda-data-source>
> </data-sources>
> :
> :
> </report>
>
> I don�t particular like this, as it would mean that I have to amend the
> report design before deploying them to my live environment. Is there a
> way how to avoid this? My reports will be integrated within a web
> application, which will be deployed on JBoss AS. My preferred option
> would be to create a JDBC datasource on the AS level and use the JNDI
> name of my datasource within the report. Is this possible?
> Thanks,
>
> Anette
>
>
>

Hi,
have you tried to use Birt Library?

I created a library in DataSource info and then for each of my report
I imported (drag&drop) datasource from library to my report.
A line similar to the following appears:

<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
name="AAAA" id="102" extends="AAA.BBB"/>
</data-sources>


Then in my library I set a JNDI connection too.

Bye
Nicola
Re: Datasource Definition / JNDI [message #250535 is a reply to message #250527] Tue, 31 July 2007 11:32 Go to previous messageGo to next message
Anette Engel is currently offline Anette EngelFriend
Messages: 24
Registered: July 2009
Junior Member
Thanks for your helpe Nicola.

However I cannot work out how to create a datasource library. Where can I
find the DataSource Info? I am using the Eclipse Plugin. I looked at the
views
_ Library Explorer: can add a resource file as a library
- Data Explorer: only possible to create a new data source for the report
- Outline: only possible to create a new data source for the report

Thanks,

Anette
Re: Datasource Definition / JNDI [message #250556 is a reply to message #250535] Tue, 31 July 2007 16:28 Go to previous messageGo to next message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Anette Engel ha scritto:
> Thanks for your helpe Nicola.
> However I cannot work out how to create a datasource library. Where can
> I find the DataSource Info? I am using the Eclipse Plugin. I looked at
> the views
> _ Library Explorer: can add a resource file as a library
> - Data Explorer: only possible to create a new data source for the report
> - Outline: only possible to create a new data source for the report
> Thanks,
>
> Anette
>


Take a look to:

http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1 /lib/index.php

if you need more help, I'll help you.

Bye
Nico
Re: Datasource Definition / JNDI [message #250919 is a reply to message #250535] Thu, 02 August 2007 09:26 Go to previous message
Eclipse UserFriend
Originally posted by: john.spangenberg.geodan.com

Hi Anette,

It's pretty straightforward.
Just create a JDBC data source. You only need to fill in two fields:
connection URL and jndi url. For the connection url you can fill in
bogus - it does not matter what.

That's it. It works for me (created a datasource 'jdbc/something' on
Oracle AS 10g, and in the jndi url field of BIRT I used exactly that
name. Without prepending it with 'java:comp/env/).

Anette Engel wrote:
> Thanks for your helpe Nicola.
> However I cannot work out how to create a datasource library. Where can
> I find the DataSource Info? I am using the Eclipse Plugin. I looked at
> the views
> _ Library Explorer: can add a resource file as a library
> - Data Explorer: only possible to create a new data source for the report
> - Outline: only possible to create a new data source for the report
> Thanks,
>
> Anette
>
Previous Topic:word emitter page break
Next Topic:View report as DOC or XLS by API
Goto Forum:
  


Current Time: Sat Dec 21 14:43:13 GMT 2024

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

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

Back to the top