new to birt question
Options
Comments
-
Hi froster,<br />
<br />
Displaying your array of Java objects is quite easy with the Scripted Data Source. With this approach, you write some script in the 'open' method to instantiate your objects... and then fill your dataset in the fetch method. As long as you return 'true' the data will be requested again... otherwise it will stop asking.<br />
<br />
open method example:<br />
favoritesClass = new Packages.SimpleClass();<br />
favorites = favoritesClass.readData();<br />
totalrows = favorites.size();<br />
currentrow = 0;<br />
<br />
fetch method example:<br />
if( currentrow >= totalrows ){<br />
return( false );<br />
}<br />
var favrow = favorites.get(currentrow);<br />
<br />
var Customer = favrow[0];<br />
var Favorite = favrow[1];<br />
var Color = favrow[2];<br />
<br />
row["Customer"]=Customer;<br />
row["Favorite"]=Favorite;<br />
row["Color"]=Color<br />
currentrow = currentrow + 1;<br />
return ( true );<br />
<br />
I uploaded a simple example into the DevShare area of this site at:<br />
<a class='bbc_url' href='http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=255'>http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=255</a><br />
<br />
Based on your second question, you may also be interested in another example located at:<br />
<a class='bbc_url' href='http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=117'>http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=117</a><br />
<br />
This second example uses a JDBC datasource... but shows how to dynamically create columns in a table at runtime. A combination of these two examples may be what you are looking for.Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 124 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax