Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [birt-report-designer-dev] Scripted data source


A better place for this discussion is on our Newsgroup .  A number of the developers, tech leads and project members are very active answering questions on this forum.  In addition, there are a lot of other BIRT users that may be able to lend a hand. 

This forum is used by the BIRT developers to discuss the inner workings of how the BIRT code is put together.  Feel welcome to monitor and add your thoughts on technical BIRT product development questions, but please post questions on how to use the product to the Newsgroup.

On your specific question, I will be happy to put a response once you have posted to the newsgroup.


Scott Rosenbaum

Olivier Jauze wrote:

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 Name:BIRT Data Engine
  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

_______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@xxxxxxxxxxx

Back to the top