BIRT问题 - 打开脚本SQL错误

时间:2017-02-14 10:01:13

标签: sql database eclipse birt maximo

您好我正在关注教程,我已将此代码插入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);

但是,我在尝试预览报告时收到以下错误:

  

ReportDesign(id = 1):   +评估脚本有错误" maximoDataSet = MXReportDataSetProvider.create(this.getDataSource()。getName(),   this.getName()); maximoDataSet.open();

     

var sqlText = new String();

     

//向sqlText变量添加查询。 sqlText ="选择workorder.wonum,   workorder.description,workorder.status,workorder.worktype,"   +" workorder.wopriority,workorder.reportdate,workorder.estdur,workorder.location"   +"来自workorder" //包含Maximo where子句   +"在哪里" + params [" where"];

     

maximoDataSet.setQuery(sqlText);":无法在函数中执行脚本   __bm_OPEN()。资源:   ------" + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource()。getName(),   this.getName()); maximoDataSet.open();

     

var sqlText = new String();

     

//向sqlText变量添加查询。 sqlText ="选择workorder.wonum,   workorder.description,workorder.status,workorder.worktype,"   +" workorder.wopriority,workorder.reportdate,workorder.estdur,workorder.location"   +"来自workorder" //包含Maximo where子句   +"在哪里" + params [" where"];

     

maximoDataSet.setQuery(SQLTEXT); +"   -----发生BIRT异常。有关更多信息,请参阅下一个例包裹   com.ibm.tivoli.maximo.report.script.MXReportRuntimeException:   显示java.lang.NullPointerException   (/报告/数据集/脚本数据集[@id =" 5"] /方法[@name ="开"]#2)。

有谁知道为什么会这样?

感谢。

0 个答案:

没有答案