[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[birt-report-designer-dev] Scripted data source
|
Hello
I am using the 2.0 M1 BIRT designer and I have issues with Scripted data sources. It seems that I can not use any
functions (like DateTimeSpan) in my data set.
I tried on the fetch method to set a row with the following instruction:
row[5] = DateTimeSpan.months(startDate, endDate);
where startDate and endDate are date objects created as following (I can display them in columns):
calendar = new java.util.GregorianCalendar(2004, 0, 1);
startDate = calendar.getTime();
When I tried to preview my output columns in the dataset editor, i got
this error (sorry it's in french, i havn't found a way to switch my rcp
designer to english yet, maybe you can help on that point too):
Une exception Birt s'est produite.
Plug-in Provider:
Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:1.0.1
Code d'erreur:data.engine.JSScriptInvalid
Message d'erreur:_expression_ _javascript_ incorrecte. Source : DataSet:ScriptSet.fetch, ligne :0, _expression_ :
function_prefix_1128073835999();function function_prefix_1128073835999(){
if(count < 10){
count ++;
row.columnAny = count;
row["columnString"]= "this is the string"+count;
row[3] = count * count;
row[4] = startDate;
row.endDate = endDate;
row[5] = DateTimeSpan.months(startDate, endDate);
return true;
}
return false;}
Erreur du moteur de script : ReferenceError: "DateTimeSpan" n'est pas défini (DataSet:ScriptSet.fetch#7)
I have the same error if I try to import a custom package (self made)
even if I put the jar file in the report viewer WEB-INF/lib folder
thanks for your help
--
Olivier Jauze