Skip to main content



      Home
Home » Archived » BIRT » ScriptFunctionService extension and birt 2.5.1(ScriptFunctionService extension not working anymore after upgrade to 2.5.1)
ScriptFunctionService extension and birt 2.5.1 [message #493122] Fri, 23 October 2009 05:42 Go to next message
Eclipse UserFriend
Hi
I have implemented a couple of reports with birt 2.3.x.
In several reports I use a javascript function to calculate the value of a computed column. To share that javascript function, I put the .js file in a new plug-in project and registered it as a org.eclipse.birt.core.ScriptFunctionService extension.
I deployed this new plugin in my report designer installation.
On Eclipse Ganymede with birt 2.3.x the script contribution works nicely.

After I upgraded to Galileo and birt 2.5.1 the script contribution does not work anymore. My plug-in is loaded (I can see it in the Eclipse installation details) and the extension is registred (with the debugger I saw that the extension is found and my .js file gets loaded. But when I try to execute a report, I get an exception:

Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "myJsFunction" is not defined.

I have attached the full stack trace.

Are there any changes in 2.5.x how I have to register script contributions?

Thanks, Daniel
Re: ScriptFunctionService extension and birt 2.5.1 [message #493491 is a reply to message #493122] Mon, 26 October 2009 10:12 Go to previous messageGo to next message
Eclipse UserFriend
Daniel,

Take a look at this thread:

http://www.birt-exchange.org/forum/eclipse-birt-newsgroup-mi rror/16784-extending-expression-builder-dialog.html

Jason

Daniel Zuberb wrote:
> Hi
> I have implemented a couple of reports with birt 2.3.x.
> In several reports I use a javascript function to calculate the value of
> a computed column. To share that javascript function, I put the .js file
> in a new plug-in project and registered it as a
> org.eclipse.birt.core.ScriptFunctionService extension.
> I deployed this new plugin in my report designer installation.
> On Eclipse Ganymede with birt 2.3.x the script contribution works nicely.
>
> After I upgraded to Galileo and birt 2.5.1 the script contribution does
> not work anymore. My plug-in is loaded (I can see it in the Eclipse
> installation details) and the extension is registred (with the debugger
> I saw that the extension is found and my .js file gets loaded. But when
> I try to execute a report, I get an exception:
>
> Caused by: org.mozilla.javascript.EcmaError: ReferenceError:
> "myJsFunction" is not defined.
>
> I have attached the full stack trace.
>
> Are there any changes in 2.5.x how I have to register script contributions?
>
> Thanks, Daniel
Re: ScriptFunctionService extension and birt 2.5.1 [message #493540 is a reply to message #493491] Mon, 26 October 2009 13:39 Go to previous message
Eclipse UserFriend
Hi Jason

Thanks for the pointer, that is exactly my problem!
I was able to get it working again with the description in the other thread.

In my plugin I defined "/js" as my js dir and put my script inside it: "/js/myfunctions.js". This didn't work anymore, so I followed the workaround from the other thread and put my script here: "/js/js/myfunction.js". Now I was able to use my script again in the designer.

But when I deployed the webviewer including my plugin, birt was again unable to find my script. I had to duplicate the script and put it both in the intended place and also in the subdir in order to get it working both in the designer and the web viewer:

myplugin.jar
|
|-- js
|     |-- myfunctions.js
|     |-- js
|          |-- myfunctions.js
|     
|-- plugin.xml
|-- etc...
Previous Topic:Yellowfins Commercial BI vs Open Source BI
Next Topic:Tooltip performance in a SWT Chart
Goto Forum:
  


Current Time: Thu Jul 10 01:23:42 EDT 2025

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

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

Back to the top