Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Connection profile for Database
buntysingh
Hi,
I am looking to generalize the Database connection, rather hard code any where in report.
I am unabe to do that.
Please help/provide me the steps to create the same. Do we need to install any other development environment to achieve the same? Please provide me the details on this.
Thanks.
Find more posts tagged with
Comments
Virgil Dodson
Hi buntysingh,
There are a few ways to externalize the data connection. One way is to use Libraries. This way, you create the Data Source one time and leverage it on many different reports. When you change the Data Source, it changes on all reports that use the library.
Another way, if you're using a connection pool, is to use the JNDI URL to that pool and control the actual data connection(s) in the pool.
You could also use the property binding. (edit a created data source to see this tab). This allows you to use an expression to build the Driver, URL, user, pass, etc, instead of hard coding these... so you could pass in parameters that control URLs from development to production for example.
Finally, if you are using a connection profile store (from the Data Source Explorer view), you can link to that file so you can control all the properties externally.
buntysingh
<blockquote class='ipsBlockquote' data-author="vdodson"><p>Hi buntysingh,<br />
<br />
There are a few ways to externalize the data connection. One way is to use Libraries. This way, you create the Data Source one time and leverage it on many different reports. When you change the Data Source, it changes on all reports that use the library.<br />
<br />
Another way, if you're using a connection pool, is to use the JNDI URL to that pool and control the actual data connection(s) in the pool.<br />
<br />
You could also use the property binding. (edit a created data source to see this tab). This allows you to use an expression to build the Driver, URL, user, pass, etc, instead of hard coding these... so you could pass in parameters that control URLs from development to production for example.<br />
<br />
Finally, if you are using a connection profile store (from the Data Source Explorer view), you can link to that file so you can control all the properties externally.</p></blockquote>
<br />
<br />
Hi VDodson,<br />
Many Thanks for the reply.<br />
Now going forward, I would like to externalize the data connection through libraries. How could I do it? Please provide us the steps/procedures for the same.<br />
<br />
Regards.
Virgil Dodson
Hi buntysingh,<br />
<br />
There are steps to create and use a library in the BIRT documentation.<br />
<br />
From the documentation page here:<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/modules/documentation/'>http://www.birt-exchange.com/modules/documentation/</a><br
/>
<br />
Select the Eclipse BIRT Designer 2.2 Online Help (This should be the same help you get within the BIRT designer)<br />
<br />
Go to Chapter 20 - Building a Shared Report Development Framework. This has steps to create and use a library.
adamzg
After a great gnashing of teeth I was able to figure out that you can create a shared data source in the "data source explorer" that comes from Eclipse Data Tools Platform.
The resource has to be defined under ODA Data Sources/BIRT JDBC Data Source. This can then be exported and used in the datasource wizard by selecting "Create from a connection profile..." browsing to the exported file and opening the ODA and JDBC Datasource twist ties to reveal the exported data source. It helps to give the file an XML extension and uncheck "encrypt" - then you can edit the file manually. If you don't encrypt the file make sure it's not in your web content directory lest you reveal database logons, passwords, etc.
Note that if you DELETE this file the BIRT report designer blithely continues to use the last settings that it had, which is hardly ideal. I didn't try exiting the workbench to see if the settings would persist on a restart, but they do persist even if you close and reopen the report.
None of this is apparent in the docs so I hope this saves somebody else some trouble...