0
votes

Hi I am following a tutorial and I have inserted this code into the open script in BIRT Eclipse.

maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

// Add query to sqlText variable.
sqlText = " select workorder.wonum, workorder.description, workorder.status, workorder.worktype, "
+ " workorder.wopriority, workorder.reportdate, workorder.estdur, workorder.location "
+ " from workorder "
// Include the Maximo where clause
+ " where " + params["where"]
;

maximoDataSet.setQuery(sqlText);

However I am receiving the following error when trying to preview the report:

ReportDesign (id = 1): + There are errors evaluating script "maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName()); maximoDataSet.open();

var sqlText = new String();

// Add query to sqlText variable. sqlText = " select workorder.wonum, workorder.description, workorder.status, workorder.worktype, " + " workorder.wopriority, workorder.reportdate, workorder.estdur, workorder.location " + " from workorder " // Include the Maximo where clause + " where " + params["where"] ;

maximoDataSet.setQuery(sqlText);": Fail to execute script in function __bm_OPEN(). Source: ------ " + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName()); maximoDataSet.open();

var sqlText = new String();

// Add query to sqlText variable. sqlText = " select workorder.wonum, workorder.description, workorder.status, workorder.worktype, " + " workorder.wopriority, workorder.reportdate, workorder.estdur, workorder.location " + " from workorder " // Include the Maximo where clause + " where " + params["where"] ;

maximoDataSet.setQuery(sqlText); + " ----- A BIRT exception occurred. See next exception for more information. Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.NullPointerException (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2).

Does anyone know why this may be?

Thanks.

1
There should be more of the stack trace that should reveal more of what happened.Sun
what value did you specify for the parameter where? You can't leave it empty. Use 1=1 and try again. Otherwise provide full stack traceJeroen

1 Answers

-2
votes

check your connect to database, sure connect sussefull