Home » Archived » BIRT » External Connection Profile File Format
| |
Re: External Connection Profile File Format [message #251573 is a reply to message #251521] |
Tue, 07 August 2007 19:16 |
Eclipse User |
|
|
|
Originally posted by: vdodson.kc.rr.com
Hi Tom,
If you want to try a quick test to create a connection profile, this
might get you closer.
1) Select Window | Show View | Other and Select "Data Source Explorer"
from Connectivity
2) Press the "New Connection Profile" button (near top-right of window)
2) Select BIRT JDBC Data Source and Next
3) Give it a name and Description and Next
4) Select your Driver Class, URL, username, password, etc. Use the
manage drivers button if you need to reach out for JDBC driver files.
Press Finish
To export this connection profile to a file, press the export button
(top-right) and save it to a file.
In a BIRT report,
Create a new data source and select from a connection profile and point
at that file.
If you choose not to encrypt the file, then you can see the xml
structure, otherwise, it's all cryptic. My simple test is below.
Virgil
<?xml version="1.0" encoding="UTF-8"
standalone="no"?><DataTools.ServerProfiles version="1.0"><profile
autoconnect="No" desc="Something"
id="eef59af1-4517-11dc-849b-c7ae483b3bee" name="My Source"
providerID="org.eclipse.birt.report.data.oda.jdbc"><baseproperties ><property
name="odaJndiName" value=""/><property name="odaDriverClass"
value="sun.jdbc.odbc.JdbcOdbcDriver"/><property name="odaURL"
value="jdbc:odbc:address"/><property name="odaPassword"
value=""/><property name="odaUser"
value=""/></baseproperties><org.eclipse.datatools.connectivity.versionInfo ><property
name="technology.version.org.eclipse.birt.report.data.oda.jdbc "
value="3.0.4"/><property name="server.version" value="4.0.0"/><property
name="technology.name.org.eclipse.birt.report.data.oda.jdbc " value="DTP
Open Data Access"/><property name="server.name"
value="ACCESS"/></org.eclipse.datatools.connectivity.versionInfo ></profile></DataTools.ServerProfiles>
Tom Keels wrote:
> I have scoured google and found several instances saying BIRT 2.2 can
> support external connection profiles and how to import them when setting
> up data sources. However, I cannot for the life of me find an example
> of what the Connection Profile file layout is.
>
> Can anyone give me an example of what one would look like? Preferably a
> JDBC source.
>
> More to the point, all I want to do is to give BIRT a relative path to a
> connection profile and have all my reports that use the same data source
> point to that file to get connection info. We work on a test, stage and
> production environment and would like to have different connection files
> for each server.
>
> Please do not point me to the report level parameter tutorial for
> switching datasources as that is not what we want.
>
> Can anyone help me? I'm at my wits end looking for this info, and I
> know I can't be the only one with this question.
>
> Thanks in advance.
>
|
|
|
Re: External Connection Profile File Format [message #251850 is a reply to message #251573] |
Thu, 09 August 2007 13:15 |
Tom Keels Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Thanks Virgil. That is closer but what I don't understand is why the
connection profile is in clear xml with the .rptdesign file, if it is
supposed to be externalized.
I don't think this is such a difficult request. I want my reports to go to
a central location (a properties file located on the webserver) and get the
connection profile.
If I create a connection profile for a data source, lets say connection.xml
and put it in usr/local/resin/.../Connections/ that no matter what server I
drop the reports on (test, stage,prod) It will pick up all the relevant
connection info from that file, not hard code all the properties (username,
password, etc) in the rptdesign file.
I can't imagine that the designers of BIRT did not think of this, and maybe
I can't see the forrest for the trees. But this is how most webservers
work.
Am I just way off base in my thinking or is there just no way to do it this
way?
"Virgil Dodson" <vdodson@kc.rr.com> wrote in message
news:46B8C50F.9060503@kc.rr.com...
> Hi Tom,
> If you want to try a quick test to create a connection profile, this might
> get you closer.
>
> 1) Select Window | Show View | Other and Select "Data Source Explorer"
> from Connectivity
> 2) Press the "New Connection Profile" button (near top-right of window)
> 2) Select BIRT JDBC Data Source and Next
> 3) Give it a name and Description and Next
> 4) Select your Driver Class, URL, username, password, etc. Use the manage
> drivers button if you need to reach out for JDBC driver files. Press
> Finish
>
> To export this connection profile to a file, press the export button
> (top-right) and save it to a file.
>
> In a BIRT report,
> Create a new data source and select from a connection profile and point at
> that file.
>
> If you choose not to encrypt the file, then you can see the xml structure,
> otherwise, it's all cryptic. My simple test is below.
>
> Virgil
>
> <?xml version="1.0" encoding="UTF-8"
> standalone="no"?><DataTools.ServerProfiles version="1.0"><profile
> autoconnect="No" desc="Something"
> id="eef59af1-4517-11dc-849b-c7ae483b3bee" name="My Source"
> providerID="org.eclipse.birt.report.data.oda.jdbc"><baseproperties ><property
> name="odaJndiName" value=""/><property name="odaDriverClass"
> value="sun.jdbc.odbc.JdbcOdbcDriver"/><property name="odaURL"
> value="jdbc:odbc:address"/><property name="odaPassword"
> value=""/><property name="odaUser"
> value=""/></baseproperties><org.eclipse.datatools.connectivity.versionInfo ><property
> name="technology.version.org.eclipse.birt.report.data.oda.jdbc "
> value="3.0.4"/><property name="server.version" value="4.0.0"/><property
> name="technology.name.org.eclipse.birt.report.data.oda.jdbc " value="DTP
> Open Data Access"/><property name="server.name"
> value="ACCESS"/></org.eclipse.datatools.connectivity.versionInfo ></profile></DataTools.ServerProfiles>
>
> Tom Keels wrote:
>> I have scoured google and found several instances saying BIRT 2.2 can
>> support external connection profiles and how to import them when setting
>> up data sources. However, I cannot for the life of me find an example of
>> what the Connection Profile file layout is.
>>
>> Can anyone give me an example of what one would look like? Preferably a
>> JDBC source.
>>
>> More to the point, all I want to do is to give BIRT a relative path to a
>> connection profile and have all my reports that use the same data source
>> point to that file to get connection info. We work on a test, stage and
>> production environment and would like to have different connection files
>> for each server.
>>
>> Please do not point me to the report level parameter tutorial for
>> switching datasources as that is not what we want.
>>
>> Can anyone help me? I'm at my wits end looking for this info, and I know
>> I can't be the only one with this question.
>>
>> Thanks in advance.
>>
|
|
|
Re: External Connection Profile File Format [message #251927 is a reply to message #251850] |
Thu, 09 August 2007 23:51 |
Linda Chan Messages: 845 Registered: July 2009 |
Senior Member |
|
|
The external connection profile feature in BIRT 2.2 is designed to work like
you'd described.
There is a known issue though with missing plugins in the BIRT Runtime
packaging.
See this other newsgroup posting for more details and the workaround:
news:<f9g3ea$31m$1@build.eclipse.org>
Linda
"Tom Keels" <tomkeels@gmail.com> wrote in message
news:f9f42j$jtu$1@build.eclipse.org...
> Thanks Virgil. That is closer but what I don't understand is why the
> connection profile is in clear xml with the .rptdesign file, if it is
> supposed to be externalized.
>
> I don't think this is such a difficult request. I want my reports to go
> to a central location (a properties file located on the webserver) and get
> the connection profile.
>
> If I create a connection profile for a data source, lets say
> connection.xml and put it in usr/local/resin/.../Connections/ that no
> matter what server I drop the reports on (test, stage,prod) It will pick
> up all the relevant connection info from that file, not hard code all the
> properties (username, password, etc) in the rptdesign file.
>
> I can't imagine that the designers of BIRT did not think of this, and
> maybe I can't see the forrest for the trees. But this is how most
> webservers work.
>
> Am I just way off base in my thinking or is there just no way to do it
> this way?
>
>
> "Virgil Dodson" <vdodson@kc.rr.com> wrote in message
> news:46B8C50F.9060503@kc.rr.com...
>> Hi Tom,
>> If you want to try a quick test to create a connection profile, this
>> might get you closer.
>>
>> 1) Select Window | Show View | Other and Select "Data Source Explorer"
>> from Connectivity
>> 2) Press the "New Connection Profile" button (near top-right of window)
>> 2) Select BIRT JDBC Data Source and Next
>> 3) Give it a name and Description and Next
>> 4) Select your Driver Class, URL, username, password, etc. Use the
>> manage drivers button if you need to reach out for JDBC driver files.
>> Press Finish
>>
>> To export this connection profile to a file, press the export button
>> (top-right) and save it to a file.
>>
>> In a BIRT report,
>> Create a new data source and select from a connection profile and point
>> at that file.
>>
>> If you choose not to encrypt the file, then you can see the xml
>> structure, otherwise, it's all cryptic. My simple test is below.
>>
>> Virgil
>>
>> <?xml version="1.0" encoding="UTF-8"
>> standalone="no"?><DataTools.ServerProfiles version="1.0"><profile
>> autoconnect="No" desc="Something"
>> id="eef59af1-4517-11dc-849b-c7ae483b3bee" name="My Source"
>> providerID="org.eclipse.birt.report.data.oda.jdbc"><baseproperties ><property
>> name="odaJndiName" value=""/><property name="odaDriverClass"
>> value="sun.jdbc.odbc.JdbcOdbcDriver"/><property name="odaURL"
>> value="jdbc:odbc:address"/><property name="odaPassword"
>> value=""/><property name="odaUser"
>> value=""/></baseproperties><org.eclipse.datatools.connectivity.versionInfo ><property
>> name="technology.version.org.eclipse.birt.report.data.oda.jdbc "
>> value="3.0.4"/><property name="server.version" value="4.0.0"/><property
>> name="technology.name.org.eclipse.birt.report.data.oda.jdbc " value="DTP
>> Open Data Access"/><property name="server.name"
>> value="ACCESS"/></org.eclipse.datatools.connectivity.versionInfo ></profile></DataTools.ServerProfiles>
>>
>> Tom Keels wrote:
>>> I have scoured google and found several instances saying BIRT 2.2 can
>>> support external connection profiles and how to import them when setting
>>> up data sources. However, I cannot for the life of me find an example
>>> of what the Connection Profile file layout is.
>>>
>>> Can anyone give me an example of what one would look like? Preferably a
>>> JDBC source.
>>>
>>> More to the point, all I want to do is to give BIRT a relative path to a
>>> connection profile and have all my reports that use the same data source
>>> point to that file to get connection info. We work on a test, stage and
>>> production environment and would like to have different connection files
>>> for each server.
>>>
>>> Please do not point me to the report level parameter tutorial for
>>> switching datasources as that is not what we want.
>>>
>>> Can anyone help me? I'm at my wits end looking for this info, and I
>>> know I can't be the only one with this question.
>>>
>>> Thanks in advance.
>>>
>
>
|
|
|
Re: External Connection Profile File Format [message #251961 is a reply to message #251927] |
Fri, 10 August 2007 13:29 |
Tom Keels Messages: 4 Registered: July 2009 |
Junior Member |
|
|
It may be designed to work like I described, but I cannot for the life of me
find 1 example, tutorial, wiki entry, newsgroup entry, etc. that actually
says how to do it.
I can import a connection profile all day long from an absolute path
C:\whatever, but cannot see how to do it from a relative path
/usr/local/whatever.
I cannot see the use in having an external connection profile setup if the
rptdesign file actually contains the connection info in plain text in the
underlying xml. And if I change the connection profle, the report should
always bind the connection profile at runtime from the imported connection
profile shouldn't it? Not hard code the connection data in the actual
report file.
Am I just not asking the question correctly? Or will BIRT not do what I am
asking. Please help.
"Linda Chan" <lchan@actuate.com> wrote in message
news:f9g9am$23g$1@build.eclipse.org...
> The external connection profile feature in BIRT 2.2 is designed to work
> like you'd described.
> There is a known issue though with missing plugins in the BIRT Runtime
> packaging.
> See this other newsgroup posting for more details and the workaround:
> news:<f9g3ea$31m$1@build.eclipse.org>
> Linda
>
> "Tom Keels" <tomkeels@gmail.com> wrote in message
> news:f9f42j$jtu$1@build.eclipse.org...
>> Thanks Virgil. That is closer but what I don't understand is why the
>> connection profile is in clear xml with the .rptdesign file, if it is
>> supposed to be externalized.
>>
>> I don't think this is such a difficult request. I want my reports to go
>> to a central location (a properties file located on the webserver) and
>> get the connection profile.
>>
>> If I create a connection profile for a data source, lets say
>> connection.xml and put it in usr/local/resin/.../Connections/ that no
>> matter what server I drop the reports on (test, stage,prod) It will pick
>> up all the relevant connection info from that file, not hard code all the
>> properties (username, password, etc) in the rptdesign file.
>>
>> I can't imagine that the designers of BIRT did not think of this, and
>> maybe I can't see the forrest for the trees. But this is how most
>> webservers work.
>>
>> Am I just way off base in my thinking or is there just no way to do it
>> this way?
>>
>>
>> "Virgil Dodson" <vdodson@kc.rr.com> wrote in message
>> news:46B8C50F.9060503@kc.rr.com...
>>> Hi Tom,
>>> If you want to try a quick test to create a connection profile, this
>>> might get you closer.
>>>
>>> 1) Select Window | Show View | Other and Select "Data Source Explorer"
>>> from Connectivity
>>> 2) Press the "New Connection Profile" button (near top-right of window)
>>> 2) Select BIRT JDBC Data Source and Next
>>> 3) Give it a name and Description and Next
>>> 4) Select your Driver Class, URL, username, password, etc. Use the
>>> manage drivers button if you need to reach out for JDBC driver files.
>>> Press Finish
>>>
>>> To export this connection profile to a file, press the export button
>>> (top-right) and save it to a file.
>>>
>>> In a BIRT report,
>>> Create a new data source and select from a connection profile and point
>>> at that file.
>>>
>>> If you choose not to encrypt the file, then you can see the xml
>>> structure, otherwise, it's all cryptic. My simple test is below.
>>>
>>> Virgil
>>>
>>> <?xml version="1.0" encoding="UTF-8"
>>> standalone="no"?><DataTools.ServerProfiles version="1.0"><profile
>>> autoconnect="No" desc="Something"
>>> id="eef59af1-4517-11dc-849b-c7ae483b3bee" name="My Source"
>>> providerID="org.eclipse.birt.report.data.oda.jdbc"><baseproperties ><property
>>> name="odaJndiName" value=""/><property name="odaDriverClass"
>>> value="sun.jdbc.odbc.JdbcOdbcDriver"/><property name="odaURL"
>>> value="jdbc:odbc:address"/><property name="odaPassword"
>>> value=""/><property name="odaUser"
>>> value=""/></baseproperties><org.eclipse.datatools.connectivity.versionInfo ><property
>>> name="technology.version.org.eclipse.birt.report.data.oda.jdbc "
>>> value="3.0.4"/><property name="server.version" value="4.0.0"/><property
>>> name="technology.name.org.eclipse.birt.report.data.oda.jdbc " value="DTP
>>> Open Data Access"/><property name="server.name"
>>> value="ACCESS"/></org.eclipse.datatools.connectivity.versionInfo ></profile></DataTools.ServerProfiles>
>>>
>>> Tom Keels wrote:
>>>> I have scoured google and found several instances saying BIRT 2.2 can
>>>> support external connection profiles and how to import them when
>>>> setting up data sources. However, I cannot for the life of me find an
>>>> example of what the Connection Profile file layout is.
>>>>
>>>> Can anyone give me an example of what one would look like? Preferably
>>>> a JDBC source.
>>>>
>>>> More to the point, all I want to do is to give BIRT a relative path to
>>>> a connection profile and have all my reports that use the same data
>>>> source point to that file to get connection info. We work on a test,
>>>> stage and production environment and would like to have different
>>>> connection files for each server.
>>>>
>>>> Please do not point me to the report level parameter tutorial for
>>>> switching datasources as that is not what we want.
>>>>
>>>> Can anyone help me? I'm at my wits end looking for this info, and I
>>>> know I can't be the only one with this question.
>>>>
>>>> Thanks in advance.
>>>>
>>
>>
>
>
|
|
|
Re: External Connection Profile File Format [message #252117 is a reply to message #251961] |
Mon, 13 August 2007 06:05 |
Tianli Zhang Messages: 2862 Registered: July 2009 |
Senior Member |
|
|
Hi Tom,
In your case, in design file you can only define your connection files's
property such as
<property name="OdaConnProfileName">Datasource</property>
<property name="OdaConnProfileStorePath">D:\datasourceCP</property>
But make sure the connection profile must be in the right path and right
name. In runtime, it will binding the connection profile automatically and
get the connection properties from the profile. And you can just change
your propertie in profile, but make sure the path and name should be
consistent.
I don't know whether I got your point:)
BTW, if you use the BIRT runtime, you should add three plugins:
org.eclipse.core.resources,
org.eclipse.core.expressions,
org.eclipse.core.filesystem
There is a related
bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=199233) about when load
connection properties in runtime, and has been already fix by the same
solution.
Regards!
|
|
|
Re: External Connection Profile File Format [message #252124 is a reply to message #252117] |
Mon, 13 August 2007 11:43 |
Tom Keels Messages: 4 Registered: July 2009 |
Junior Member |
|
|
I think I got some of that.
Fact is I have done all this and it still doesn't work. I guess I'm to the
point of a rant now. But this shouldn't be difficult. This should have
been the first thing designed in the BIRT project.
If someone who actually has this working (really working, not just read
where it works) could post a wiki article on how its done, that would be
great. Fact is I don't have the time to code and pray, I need a proof of
concept showing it works or I have to scrap it for :shudder: bus-o.
"Tianli" <tzhang@actuate.com> wrote in message
news:3c9b31ca44eb09149ecf0ce86eaba36f$1@www.eclipse.org...
> Hi Tom,
>
> In your case, in design file you can only define your connection files's
> property such as
> <property name="OdaConnProfileName">Datasource</property>
> <property name="OdaConnProfileStorePath">D:\datasourceCP</property>
> But make sure the connection profile must be in the right path and right
> name. In runtime, it will binding the connection profile automatically and
> get the connection properties from the profile. And you can just change
> your propertie in profile, but make sure the path and name should be
> consistent.
> I don't know whether I got your point:)
>
> BTW, if you use the BIRT runtime, you should add three plugins:
> org.eclipse.core.resources, org.eclipse.core.expressions,
> org.eclipse.core.filesystem
>
> There is a related
> bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=199233) about when load
> connection properties in runtime, and has been already fix by the same
> solution.
>
> Regards!
>
>
|
|
|
Goto Forum:
Current Time: Sat Nov 09 04:58:56 GMT 2024
Powered by FUDForum. Page generated in 0.03939 seconds
|