Error wirh Scripted data Sources [message #70711] |
Thu, 01 September 2005 16:07 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: sai.yelamanchili.gmail.com
Hi
I'm trying to work with scripted data sources and I get the following
error :
" Error0 : data.engine.JSScriptInvalid(1 time)detail: Invalid
Javascript expression. Source: DataSet:Vendor.open, line: 0,
Expression:function_prefix_1125545377488();function
function_prefix_1125545377488(){import
Packages.com.rpc.core.accounting.model; "
Whatever may be the code for Open() function, the error persists. Am I
doing anythig wrong with the import statements ? Does anyone have any
idea reagarding this ? Help required soon and appreciated.
Thanks in advance
Sai
|
|
|
Re: Error wirh Scripted data Sources [message #70817 is a reply to message #70711] |
Thu, 01 September 2005 19:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Scott Rosenbaum![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=scottr%40innoventsolutions.com) Messages: 425 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030402050207030408030205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sai,
Try removing the import function and just instantiate your object using
the fully qualified path.
myModel = new Packages.com.rpc.core.accounting.model.YourClass();
As I understand it there is a bug, that prevents the importPackage
function from working in the open method of the ScriptedDataSource when
you are doing a preview. Apparently this is schedule for a fix by 2.0M1.
The other alternative is that you can move your importPackage call to
the top level (use outline view) of the BIRT report design and it should
work. I don't like this solution since it requires that you put this
one critical piece of import code in a location that is completely
unrelated to where the class is used. So I would recommend that you
just instantiate the class using the fully qualified path.
Also, you need to make sure that the jar file that holds your package is in:
\eclipse\plugins\org.eclipse.birt.report.viewer_1.0.0\birt\W EB-INF\lib\
Scott Rosenbaum
BIRT PMC
Sai Yelamanchili wrote:
> Hi
> I'm trying to work with scripted data sources and I get the following
> error :
>
> " Error0 : data.engine.JSScriptInvalid(1 time)detail: Invalid
> Javascript expression. Source: DataSet:Vendor.open, line: 0,
> Expression:function_prefix_1125545377488();function
> function_prefix_1125545377488(){import
> Packages.com.rpc.core.accounting.model; "
>
> Whatever may be the code for Open() function, the error persists. Am I
> doing anythig wrong with the import statements ? Does anyone have any
> idea reagarding this ? Help required soon and appreciated.
>
> Thanks in advance
> Sai
--------------030402050207030408030205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sai,<br>
<br>
Try removing the import function and just instantiate your object using
the fully qualified path. <br>
<br>
myModel = new Packages.com.rpc.core.accounting.model.YourClass();<br>
<br>
As I understand it there is a bug, that prevents the importPackage
function from working in the open method of the ScriptedDataSource when
you are doing a preview. Apparently this is schedule for a fix by
2.0M1. <br>
<br>
The other alternative is that you can move your importPackage call to
the top level (use outline view) of the BIRT report design and it
should work. I don't like this solution since it requires that you put
this one critical piece of import code in a location that is completely
unrelated to where the class is used. So I would recommend that you
just instantiate the class using the fully qualified path.<br>
<br>
Also, you need to make sure that the jar file that holds your package
is in:<br>
<font face="Times New Roman" size="2"><span style="font-size: 10pt;"> \eclipse\plugins\org.eclipse.birt.report.viewer_1.0.0\birt\W EB-INF\lib\ <br>
<br>
Scott Rosenbaum<br>
BIRT PMC<br>
<br>
</span></font><br>
Sai Yelamanchili wrote:
<blockquote cite="middf790o$og0$1@news.eclipse.org" type="cite">Hi
<br>
I'm trying to work with scripted data sources and I get the following
error :
<br>
<br>
" Error0 : data.engine.JSScriptInvalid(1 time)detail: Invalid
Javascript expression. Source: DataSet:Vendor.open, line: 0,
Expression:function_prefix_1125545377488();function
function_prefix_1125545377488(){import
Packages.com.rpc.core.accounting.model; & amp;nbsp; "
<br>
<br>
Whatever may be the code for Open() function, the error persists. Am I
doing anythig wrong with the import statements ? Does anyone have any
idea reagarding this ? Help required soon and appreciated.
<br>
<br>
Thanks in advance
<br>
Sai
<br>
</blockquote>
</body>
</html>
--------------030402050207030408030205--
|
|
|
Re: Error wirh Scripted data Sources [message #70831 is a reply to message #70817] |
Thu, 01 September 2005 19:28 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C5AF09.CBE0C900
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sai,
Try moving your code to the open method of the Data Set.
Jason Weathersby
BIRT PMC
"Scott Rosenbaum" <scottr@innoventsolutions.com> wrote in message =
news:df7jk1$7df$1@news.eclipse.org...
Sai,
Try removing the import function and just instantiate your object =
using the fully qualified path. =20
myModel =3D new Packages.com.rpc.core.accounting.model.YourClass();
As I understand it there is a bug, that prevents the importPackage =
function from working in the open method of the ScriptedDataSource when =
you are doing a preview. Apparently this is schedule for a fix by =
2.0M1. =20
The other alternative is that you can move your importPackage call to =
the top level (use outline view) of the BIRT report design and it should =
work. I don't like this solution since it requires that you put this =
one critical piece of import code in a location that is completely =
unrelated to where the class is used. So I would recommend that you =
just instantiate the class using the fully qualified path.
Also, you need to make sure that the jar file that holds your package =
is in:
=
\eclipse\plugins\org.eclipse.birt.report.viewer_1.0.0\birt\W EB-INF\lib\
Scott Rosenbaum
BIRT PMC
Sai Yelamanchili wrote:=20
Hi=20
I'm trying to work with scripted data sources and I get the =
following error :=20
" Error0 : data.engine.JSScriptInvalid(1 time)detail: Invalid =
Javascript expression. Source: DataSet:Vendor.open, line: 0, =
Expression:function_prefix_1125545377488();function =
function_prefix_1125545377488(){import =
Packages.com.rpc.core.accounting.model; "=20
Whatever may be the code for Open() function, the error persists. Am =
I doing anythig wrong with the import statements ? Does anyone have any =
idea reagarding this ? Help required soon and appreciated.=20
Thanks in advance=20
Sai=20
------=_NextPart_000_0014_01C5AF09.CBE0C900
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Sai,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Try moving your code to the open method =
of the Data=20
Set.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Jason Weathersby</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>BIRT PMC</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Scott Rosenbaum" <<A=20
=
href=3D"mailto:scottr@innoventsolutions.com">scottr@innoventsolutions.com=
</A>>=20
wrote in message <A=20
=
href=3D"news:df7jk1$7df$1@news.eclipse.org">news:df7jk1$7df$1@news.eclips=
e.org</A>...</DIV>Sai,<BR><BR>Try=20
removing the import function and just instantiate your object using =
the fully=20
qualified path. <BR><BR>myModel =3D new=20
Packages.com.rpc.core.accounting.model.YourClass();<BR><BR >As I =
understand it=20
there is a bug, that prevents the importPackage function from working =
in the=20
open method of the ScriptedDataSource when you are doing a =
preview. =20
Apparently this is schedule for a fix by 2.0M1. =
<BR><BR> The other=20
alternative is that you can move your importPackage call to the top =
level (use=20
outline view) of the BIRT report design and it should work. I =
don't like=20
this solution since it requires that you put this one critical piece =
of import=20
code in a location that is completely unrelated to where the class is=20
used. So I would recommend that you just instantiate the class =
using the=20
fully qualified path.<BR><BR>Also, you need to make sure that the jar =
file=20
that holds your package is in:<BR><FONT face=3D"Times New Roman" =
size=3D2><SPAN=20
style=3D"FONT-SIZE: =
10pt"> \eclipse\plugins\org.eclipse.birt.report.viewer_1.0.0\birt\W EB-INF\=
lib\<BR><BR>Scott=20
Rosenbaum<BR>BIRT PMC<BR><BR></SPAN></FONT><BR>Sai Yelamanchili wrote: =
<BLOCKQUOTE cite=3Dmiddf790o$og0$1@news.eclipse.org type=3D"cite">Hi =
<BR>I'm=20
trying to work with scripted data sources and I get the following =
error :=20
<BR><BR>" Error0 : data.engine.JSScriptInvalid(1 time)detail: =
Invalid=20
Javascript expression. Source: DataSet:Vendor.open, line: 0,=20
Expression:function_prefix_1125545377488();function=20
function_prefix_1125545377488(){import=20
=
Packages.com.rpc.core.accounting.model; & amp;nbsp; &nbs=
p; =20
" <BR><BR>Whatever may be the code for Open() function, the error =
persists.=20
Am I doing anythig wrong with the import statements ? Does anyone =
have any=20
idea reagarding this ? Help required soon and appreciated. =
<BR><BR>Thanks in=20
advance <BR>Sai <BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0014_01C5AF09.CBE0C900--
|
|
|
Re: Error wirh Scripted data Sources [message #70874 is a reply to message #70817] |
Thu, 01 September 2005 20:39 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: sai.yelamanchili.gmail.com
Scott Rosenbaum wrote:
> Sai,
>
> Try removing the import function and just instantiate your object using
> the fully qualified path.
>
> myModel = new Packages.com.rpc.core.accounting.model.YourClass();
>
> As I understand it there is a bug, that prevents the importPackage
> function from working in the open method of the ScriptedDataSource when
> you are doing a preview. Apparently this is schedule for a fix by 2.0M1.
>
> The other alternative is that you can move your importPackage call to
> the top level (use outline view) of the BIRT report design and it should
> work. I don't like this solution since it requires that you put this
> one critical piece of import code in a location that is completely
> unrelated to where the class is used. So I would recommend that you
> just instantiate the class using the fully qualified path.
>
> Also, you need to make sure that the jar file that holds your package is in:
> \eclipse\plugins\org.eclipse.birt.report.viewer_1.0.0\birt\W EB-INF\lib\
>
> Scott Rosenbaum
> BIRT PMC
>
>
> Sai Yelamanchili wrote:
>
>> Hi
>> I'm trying to work with scripted data sources and I get the following
>> error :
>>
>> " Error0 : data.engine.JSScriptInvalid(1 time)detail: Invalid
>> Javascript expression. Source: DataSet:Vendor.open, line: 0,
>> Expression:function_prefix_1125545377488();function
>> function_prefix_1125545377488(){import
>> Packages.com.rpc.core.accounting.model; "
>>
>> Whatever may be the code for Open() function, the error persists. Am I
>> doing anythig wrong with the import statements ? Does anyone have any
>> idea reagarding this ? Help required soon and appreciated.
>>
>> Thanks in advance
>> Sai
>
Scott,
Thanks much. It worked.
It also worked when I used :
importPackage(Packages.com.rpc.core.accounting.model);
myModel = new Myclass()
Thanks again
Sai
|
|
|
|
Re: Error wirh Scripted data Sources [message #72241 is a reply to message #70817] |
Tue, 06 September 2005 13:10 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: sai.yelamanchili.gmail.com
Jason
What I'm exactly doing is :
I have an object A and a class B. Class B has a function that takes an
argument "x", which is a date and returns ArrayList of A objects.
Now, I have to use the Scripetd Data Source to make a report from the
returned ArrayList.
In my open and fetch of Data Set, I'm usig the following code:
Open()
importPackage(Packages.com.rpc.core.accounting.model);
dt = new Date(params["input"]);
c = new B().A(dt);
itrLista = c.iterator();
Fetch()
while(itrLista.hasNext())
{
a = itrLista.next();
row["1"]= a.get1();
row["2"]= a.get2();
row["3"]= a.get3();
row["4"]= a.get4();
row["5"]= a.5();
return true;
}
return false;
I get the following error :
" Some required parameter values are not set or set to incompatible data
type."
After I enter the date,
the error is:
" Script engine error: TypeError: findOpenDepositsAsOfDate is not a
function. (DataSet:OpenVendorDeposit.open#2 "
1. while creating the report parameter input, Do I have to select type
as String or Datetime.
And any other ideas how I can proceed with this. Cudnt't find any
online-help. I'm actually new to reporting.
I appreciate Ur help.
Thanks
Sai
|
|
|
Re: Error wirh Scripted data Sources [message #72474 is a reply to message #72241] |
Wed, 07 September 2005 16:11 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
|
Sai,
A Datetime parameter should have worked. Can you tell me where
findOpenDepositsAsOfDate is defined? I would stub out a simple class that
has a function that takes a Datetime parm and retruns a preloaded array
list.
Are you variables really named 1, 2, .. ?
Jason Weathersby
BIRT PMC
"Sai Yelamanchili" <sai.yelamanchili@gmail.com> wrote in message
news:431D9563.7010107@gmail.com...
> Jason
> What I'm exactly doing is :
> I have an object A and a class B. Class B has a function that takes an
> argument "x", which is a date and returns ArrayList of A objects.
> Now, I have to use the Scripetd Data Source to make a report from the
> returned ArrayList.
> In my open and fetch of Data Set, I'm usig the following code:
>
> Open()
> importPackage(Packages.com.rpc.core.accounting.model);
> dt = new Date(params["input"]);
> c = new B().A(dt);
> itrLista = c.iterator();
>
> Fetch()
> while(itrLista.hasNext())
> {
> a = itrLista.next();
> row["1"]= a.get1();
> row["2"]= a.get2();
> row["3"]= a.get3();
> row["4"]= a.get4();
> row["5"]= a.5();
> return true;
> }
> return false;
>
> I get the following error :
> " Some required parameter values are not set or set to incompatible data
> type."
> After I enter the date,
> the error is:
> " Script engine error: TypeError: findOpenDepositsAsOfDate is not a
> function. (DataSet:OpenVendorDeposit.open#2 "
>
> 1. while creating the report parameter input, Do I have to select type as
> String or Datetime.
> And any other ideas how I can proceed with this. Cudnt't find any
> online-help. I'm actually new to reporting.
> I appreciate Ur help.
>
> Thanks
> Sai
|
|
|
Powered by
FUDForum. Page generated in 0.04634 seconds