[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [birt-report-designer-dev] Scripted data source
|
Olivier,
You need to upgrade to the release version of BIRT. The version that you are using (probably M3)
handles scripting differently from the current (release) version. Earlier versions did not use a
full return code and instead just returned the value of the last assignment op from the function.
So in your version the following code will probably work.
if(count < 10){
count++;
true;
}
false;
Scott Rosenbaum
BIRT PMC
-----Original Message-----
From: "Olivier Jauze" <ojauze@xxxxxxxxx>
Sent: Tuesday, June 7, 2005 10:45 am
To: birt-report-designer-dev@xxxxxxxxxxx
Subject: [birt-report-designer-dev] Scripted data source
Hello,
I am trying to use a Scripted data source but I get some tricky
errors. I have downloaded a demo video on the birt site (in the
tutorial section) and I am trying to do the same things.
In my data set code editor, i have written the following instructions:
- on the open property:
count = 0;
- on the fetch property:
if(count < 10){
count++;
return true;
}
return false;
Unfortunately I got an error when I try to preview my result on the DataSet
org.eclipse.birt.data.engine.core.DataException occurred
Error Code:DATA_EXCEPTION_SCRIPT_EVAL_ERROR
Error Code:DATA_EXCEPTION_SCRIPT_EVAL_ERROR
Error Message:Error evaluating script
(source:DataSet:Script_DataSet.fetch, line:2): invalid return
(DataSet:Script_DataSet.fetch#2).
invalid return (DataSet:Script_DataSet.fetch#2)
Maybe I am doing something wrong but i can figure out what. In fact, I
can not use any javascript function (like the importPackage one).
Thanks for your help.
note: I am using Rational Application Developer 6.0.0.1 and the report
designer 1.0-1 (downloaded today)
--
Olivier Jauze
_______________________________________________
birt-report-designer-dev mailing list
birt-report-designer-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev
Innovent Solutions
866-466-6868
Knowledge.Service.Solutions