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)
Questions to the tutorial: Creating Custom BIRT Data Sources
ManInBlack
Hi,
I have got a question to the tutorial "Creating Custom BIRT Data Sources".
The documentation is really good. But I don´t know how to go ahead with my own connection.
I am working with a CORBA-Platform, which I would like to connect to BIRT.
Inside of the CORBA-Plattform there are methods like "connect" in order to connect to CORBA. There are also a method to execute a query
But where I have to put the method connect, ...? And what are the following steps? What would you do to program a oda extension?
The examples to the tutorial above, like the csv oda example have just helped me a bit.
It would very friendly if you could give hints.
Thank you
Bye
ManInBlack
Find more posts tagged with
Comments
ManInBlack
Sorry, there is the link to the video:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/news-events/webinar/designing-birt-reports/345-creating-custom-birt-data-sources-archived-webinar-/'>Creating
Custom BIRT Data Sources (Archived Webinar) - BIRT Exchange</a><br />
<br />
Here is another description:<br />
<a class='bbc_url' href='
http://my.safaribooksonline.com/9780321580313/ch20lev1sec3'>Safari
Books Online - 9780321580313 - Integrating and Extending BIRT, Second Edition</a><br />
<br />
And here are the examples:<br />
<a class='bbc_url' href='
http://www.actuate.com/products/resources/?articleid=11719'>Actuate
BIRT Community Contributions</a><br />
<br />
Please download it that files and try:<br />
ODA (Open Data Access) drivers<br />
<br />
* The CSV ODA driver example is a plug-in that reads data from a CSV file.<br />
o org.eclipse.birt.report.data.oda.csv.zip <br />
o org.eclipse.birt.report.data.oda.csv.ui.zip <br />
o testCSVODA.zip<br />
<br />
<br />
It is really great. But I think it isn´t easy to use it for own projects.<br />
<br />
Now i would like to give you a test java class:<br />
<br />
package output_table;<br />
<br />
public class Main {<br />
<br />
/**<br />
*
@param
args<br />
*/<br />
public static void main(String[] args) {<br />
String [][] arrayForBIRT = new String[5][2];<br />
<br />
arrayForBIRT[0][0]="row1,column1";<br />
arrayForBIRT[0][1]="row1,column2";<br />
arrayForBIRT[1][0]="row2,column1";<br />
arrayForBIRT[1][1]="row2,column2";<br />
arrayForBIRT[2][0]="row3,column1";<br />
arrayForBIRT[2][1]="row3,column2";<br />
arrayForBIRT[3][0]="row4,column1";<br />
arrayForBIRT[3][1]="row4,column2";<br />
arrayForBIRT[4][0]="row5,column1";<br />
arrayForBIRT[4][1]="row5,column2";<br />
<br />
for (int i = 0; i < arrayForBIRT.length; i++) {<br />
for (int j = 0; j < arrayForBIRT.length; j++) {<br />
System.out.print(arrayForBIRT
[j]+ " ");<br />
System.out.print(arrayForBIRT
[++j] + "n");<br />
break;<br />
}<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />
<br />
The output is:<br />
<br />
row1,column1 row1,column2<br />
row2,column1 row2,column2<br />
row3,column1 row3,column2<br />
row4,column1 row4,column2<br />
row5,column1 row5,column2<br />
<br />
column1 should be my first column in BIRT.<br />
column2 is my second column in BIRT. <br />
<br />
Now i would connect it with a birt oda extention.<br />
<br />
Please experts help me, i have no idea, how i can realise it.<br />
<br />
It would be a pleasure hearing from your.<br />
<br />
Byebye
johnw
Create a new ODA Runtime Project, located under the BIRT category of project types.
Use the template for ODA runtime, and it will create a good mapping of classes to functionality.
Your Corba connection will go into the Connection class. You will want to pass an instance of your opened Corba connection, or a reference to the ODA Connection to all other objects in your ODA.
Your Corba function execution will go into the Query.executeQuery() method, which should create a ResultSet object, which is responsible for creating a "cursor", which is basically just going to act like a Collection iterator for retrieving your next row and column data.
So, at a high level, you have
Connection(Corba Connection) -> Query(Corba Execute) -> ResultSet (Some sort of iterator containing your results)
Then, implement Connection.open to open your Corba connection, Connection.newQuery to create your Query object, Query.prepare to take in any parameters, Query.execute to run, and ResultSet.next to advance your iterator, and get* methods to get data in the appropriate columns and return the appropriate types.
The rest is just creating those objects, and creating the meta-data for describing the results and parameter information.
Now keep in mind, thats just the runtime driver, that isn't the GUI portion that goes into the designer, thats a whole other ball of wax.