Skip to main content



      Home
Home » Archived » BIRT » scripted Datasource example?
scripted Datasource example? [message #72655] Thu, 08 September 2005 10:17 Go to next message
Eclipse UserFriend
Originally posted by: johannes.rumpf.evivax.com

Hi,

has anybody a more detailed example for scripting a datasource for POJO,
than what is found here
http://www.eclipse.org/birt/wiki/index.php?n=FAQ.DataAccess
?

I would be very happy if anybody can share some more details.

thanks a lot

Yours
Johannes
Re: scripted Datasource example? [message #72731 is a reply to message #72655] Thu, 08 September 2005 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Johannes
We will be adding some examples of this shortly.
In the meantime check out Stavros's Example
http://tools.osmosis.gr/blog/archives/2005/06/birt_and_objec t.html

Jason Weathersby
BIRT PMC

"Johannes Rumpf" <johannes.rumpf@evivax.com> wrote in message
news:dfph6j$4u4$1@news.eclipse.org...
> Hi,
>
> has anybody a more detailed example for scripting a datasource for POJO,
> than what is found here
> http://www.eclipse.org/birt/wiki/index.php?n=FAQ.DataAccess
> ?
>
> I would be very happy if anybody can share some more details.
>
> thanks a lot
>
> Yours
> Johannes
Re: scripted Datasource example? [message #72946 is a reply to message #72731] Fri, 09 September 2005 03:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johannes.rumpf.evivax.com

Jason

> We will be adding some examples of this shortly.
> In the meantime check out Stavros's Example
> http://tools.osmosis.gr/blog/archives/2005/06/birt_and_objec t.html

thx. Thats a fine example. But i've got an other problem.

everytime i try to call a function like

myreport = new Packages.com.evivax.bi.test.bi_report_1.getinstance();
myreport.initialize();

i got the following error:

A Birt exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:1.0.1
Fehlercode:data.engine.JSScriptInvalid
Fehlermeldung:Ungültiger Javascript-Ausdruck. Quelle:
DataSet:Datensatz.open, Zeile: 0, Ausdruck:
function_prefix_1126250336655();function
function_prefix_1126250336655(){myreport = new
Packages.com.evivax.bi.test.bi_report_1.getinstance();
myreport.initialize();}
Script-Engine-Fehler: TypeError: [JavaPackage
com.evivax.bi.test.bi_report_1.getinstance] is not a function.


i pushed my jar file into
eclipse\plugins\org.eclipse.birt.report.viewer_1.0.1\birt\WE B-INF\lib

but i doesn't feel like it's getting a touch on it. But i'm not sure if
its a missing jar error. With other functions the same error appear.

Johannes
johannes
Re: scripted Datasource example? [message #72980 is a reply to message #72946] Fri, 09 September 2005 05:02 Go to previous messageGo to next message
Eclipse UserFriend
didn't you miss a pair of brackets after bi_report_1 in this line:
myreport = new
Packages.com.evivax.bi.test.bi_report_1.getinstance();?

I believe it might be better using:
myreport = new
Packages.com.evivax.bi.test.bi_report_1().getinstance();

But I'm not sure, since I didn't use Packages to instanciate an object
yet...
On Fri, 09 Sep 2005 09:46:30 +0200, Johannes Rumpf
<johannes.rumpf@evivax.com> wrote:

>myreport = new
>Packages.com.evivax.bi.test.bi_report_1.getinstance();
Re: scripted Datasource example? [message #73029 is a reply to message #72980] Fri, 09 September 2005 10:22 Go to previous message
Eclipse UserFriend
Originally posted by: johannes.rumpf.evivax.com

Hi Frederic,

> didn't you miss a pair of brackets after bi_report_1 in this line:
> myreport = new
> Packages.com.evivax.bi.test.bi_report_1.getinstance();?

no that will normaly do.

My Problem lays in an other direction:
http://www.mozilla.org/rhino/ScriptingJava.html
says:

--
One thing to be careful of is Rhino’s handling of errors in specifying
Java package or class names. If java.MyClass is accessed, Rhino attempts
to load a class named java.MyClass. If that load fails, it assumes that
java.MyClass is a package name, and no error is reported:

js> java.MyClass

[JavaPackage java.MyClass]

Only if you attempt to use this object as a class will an error be reported.
--
So my jar file isn't loaded correctly and the error misleads me into
wrong direction.

Johannes
Re: scripted Datasource example? [message #73082 is a reply to message #72946] Thu, 08 September 2005 23:01 Go to previous message
Eclipse UserFriend
Johannes,

Are you doing this on the Open method of the Datasource or Dataset?
I believe there is a bug on the Open of the Datasource.
Try it on the Dataset.

Jason Weathersby
BIRT PMC

"Johannes Rumpf" <johannes.rumpf@evivax.com> wrote in message
news:dfreku$fnb$1@news.eclipse.org...
> Jason
>
>> We will be adding some examples of this shortly.
>> In the meantime check out Stavros's Example
>> http://tools.osmosis.gr/blog/archives/2005/06/birt_and_objec t.html
>
> thx. Thats a fine example. But i've got an other problem.
>
> everytime i try to call a function like
>
> myreport = new Packages.com.evivax.bi.test.bi_report_1.getinstance();
> myreport.initialize();
>
> i got the following error:
>
> A Birt exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:1.0.1
> Fehlercode:data.engine.JSScriptInvalid
> Fehlermeldung:Ung
Previous Topic:Problem with datatypes from Java to JavaScript
Next Topic:Chart generation problems
Goto Forum:
  


Current Time: Thu Jul 17 20:47:18 EDT 2025

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

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

Back to the top