DataSet using Java Classes [message #147058] |
Wed, 22 March 2006 11:06  |
Eclipse User |
|
|
|
Hello all,
I am using BIRT 2.0,Eclipse 3.1 and Tomcat 5.5. My objective is to
retrieve data from Java classes(Vectors,Hashtables) and import them into
my Dataset.
For this I wrote Java classes,which generate data from the database and
return the data in the form of a Vector(made up of String arrays).
I used JavaScript(Rhino) for importing these packages and used the
methods. My code is :
open tab
-----------
importPackage(Packages.mypackage);
myclass = new Connection();
rowdata = myclass.readData();
totalrows = rowdata.size();
currentrow = 0;
fetch tab
----------
if(currentrow >= totalrows)
{ return(false);}
var favrow = rowdata.get(currentrow);
var Customer = favrow[0];
var Favorite = favrow[1];
var Color = favrow[2];
row["Customer"] = Customer;
row["Favorite"] = Favorite;
row["Color"] = Color;
currentrow = currentrow+1;
return (true);
close tab
----------
rowdata = null;
tmsreportclass = null;
The DataSet shows the values in the preview results but the values dont
show in the preview tab.Could someone guide me if they had this error
before
best wishes
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04489 seconds