Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » BIRT Library Question
BIRT Library Question [message #1020584] Mon, 18 March 2013 14:00 Go to next message
birt user is currently offline birt userFriend
Messages: 26
Registered: January 2013
Junior Member
I'm trying to understand how to use the BIRT Library feature.

I currently have a single report project which contains both a library and a sample report. I setup my data source in the library, but I want to setup the data set only in the report and not in the library. Is this possible? I don't see an option to use a data source from the library in my report. When I go in my report and try to add a data set, a dialog box appears which says that no data sources are created and offers to let me add one. I don't want to add a data source, but rather use the data source from the library.
Re: BIRT Library Question [message #1020590 is a reply to message #1020584] Mon, 18 March 2013 14:19 Go to previous messageGo to next message
birt user is currently offline birt userFriend
Messages: 26
Registered: January 2013
Junior Member
I think that I figured out the answer to my own question from reading this old thread - http://www.eclipse.org/forums/index.php/t/71730/

To add a library data source to a report:

1. Open the Resource Explorer.
2. Open the Outline tab for the report.
3. Drag the data source form the library's data source in the Resource Explorer to the Data Source area in the Outline tab.

This was difficult for me to figure out since I was expecting a right-click menu option (like right-click on the data source in the report and choose 'add from library' or right-click the data source in the library and choose copy and then paste it into the report).

My next step is to test if the data source can be shared across report projects.
Re: BIRT Library Question [message #1020617 is a reply to message #1020590] Mon, 18 March 2013 15:20 Go to previous messageGo to next message
birt user is currently offline birt userFriend
Messages: 26
Registered: January 2013
Junior Member
I came across a new problem with the library feature that is rather puzzling.

Steps to Reproduce

1. Create a new data source inside a library.
2. Create a new report using the data source from step 1.

Expected Behavior - Database username/password will only be in the .rtplibrary file and not in the .rptdesign file.

Actual Behavior - The following lines are in the .rptdesign file:

<oda-data-source name="Library Data Source" id="10" extends="library.Library Data Source">
       <property name="servername">myServer</property>
       <property name="username">myUsername</property>
       <encrypted-property name="password" encryptionID="base64">myPassword-removed</encrypted-property>
       <property name="domain">myDomain</property>
</oda-data-source>

Is this normal behavior? Or did I miss setting some option? My goal in using libraries is to abstract the connection information outside of the .rptdesign files.

[Updated on: Mon, 18 March 2013 15:22]

Report message to a moderator

Re: BIRT Library Question [message #1020634 is a reply to message #1020617] Mon, 18 March 2013 15:58 Go to previous messageGo to next message
birt user is currently offline birt userFriend
Messages: 26
Registered: January 2013
Junior Member
Since I am using an odd custom data source, I retested with the built-in JDBC connection using a library and I got the same behavior. Here is a sample from a .rptdesign file referencing a data source defined in a library file:

<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="JDBC Data Source" id="7" extends="library.JDBC Data Source">
    <property name="odaDriverClass">com.mysql.jdbc.Driver</property>
    <property name="odaURL">jdbc:mysql://localhost:3306/myDb</property>
    <property name="odaUser">user</property>
    <encrypted-property name="odaPassword" encryptionID="base64">password</encrypted-property>
</oda-data-source>
Re: BIRT Library Question [message #1020636 is a reply to message #1020634] Mon, 18 March 2013 16:00 Go to previous message
birt user is currently offline birt userFriend
Messages: 26
Registered: January 2013
Junior Member
Unfortunately, this is a known bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=343527
Previous Topic:Font problem
Next Topic:Problem with report creating on PBI form
Goto Forum:
  


Current Time: Sat Nov 29 00:25:15 GMT 2014

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

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