Skip to main content



      Home
Home » Archived » BIRT » Acessing JAVA class using BIRT - Scripted data source
Acessing JAVA class using BIRT - Scripted data source [message #136762] Tue, 28 February 2006 00:03 Go to next message
Eclipse UserFriend
Originally posted by: shruthi.cn.in.bosch.com

Hello everybody,
I have problem using Scripted data source to access a simple java class.
The steps that i am doing are as follows:
1) Create a java class say "SimpleClass" in a package "BirtPack".
2) Create a JAR file for this.
3) Place the JAR in
"<ECLIPSE_INSTALL>\plugins\org.eclipse.birt.report.viewer\birt\WEB-INF\lib "
4) Restart eclipse, Open a rptdesign file.
5) In the open method of Data Set, I include
importPackage(Packages.birtpack);
favoritesClass = new SimpleClass();
favorites = favoritesClass.readData(); /* readData method returns a
vector where each vector item contains 3 strings */
totalrows = favorites.size();
currentrow = 0;
6) In the fetch method, i include the following code
if( currentrow >= totalrows ){
return( false );
}
var favrow = favorites.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 );
7) I have created a table and dragging of the columns into table, is done.

Is there anything that i am missing out. I am getting errors when i see
the preview. I have tried to solve this for hours. I would be greatful to
any help recieved.

Thanks
Best Regards
Shruthi
Re: Acessing JAVA class using BIRT - Scripted data source [message #136856 is a reply to message #136762] Tue, 28 February 2006 04:43 Go to previous message
Eclipse UserFriend
>I am getting errors when i see
>the preview. I have tried to solve this for hours. I would be greatful to
>any help recieved.

What errors do you get? It might help to know the error message ;)
Previous Topic:Externalizing DataSource properties
Next Topic:suppress pdf table of contents
Goto Forum:
  


Current Time: Thu Jul 10 03:33:09 EDT 2025

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

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

Back to the top