2017-02-14 51 views
0

嗨,我正在學習一個教程,並且已將此代碼插入到BIRT Eclipse中的打開腳本中。BIRT問題 - 打開腳本SQL錯誤

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(這一點。 。了getDataSource()的getName(), this.getName()); maximoDataSet.open();

變種SQLTEXT =新的String();

//添加查詢到sqlText變量。 sqlText =「select workorder.wonum, workorder.description,workorder.status,workorder.worktype,」 +「workorder.wopriority,workorder.reportdate,workorder.estdur,workorder.location」 +「from workorder」// Include Maximo where子句 +「where」+ params [「where」];

maximoDataSet.setQuery(SQLTEXT); 「:失敗在函數來執行腳本 __bm_OPEN()來源: ------。」 + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource()的getName()。 , this.getName()); maximoDataSet.open();

var sqlText = new String();

//將查詢添加到sqlText變量。 sqlText =「select workorder.wonum, workorder.description,workorder.status,workorder.worktype,」 +「workorder.wopriority,workorder.reportdate,workorder.estdur,workorder.location」 +「from workorder」// Include Maximo where子句 +「where」+ params [「where」];

maximoDataSet.setQuery(sqlText); +「 -----發生BIRT異常。有關更多信息,請參見下一個異常。 /腳本的數據集[@ ID = 「5」] /方法[@名稱= 「打開」]#2)。

有誰知道爲什麼這可能是?

感謝。

+1

有sh應該更多的是應該揭示更多發生事件的堆棧軌跡。 – Sun

+0

您爲參數指定了哪個值?你不能把它留空。使用1 = 1並再試一次。否則提供完整的堆棧跟蹤 – Jeroen

回答

-1

檢查你的連接數據庫,確定連接sussefull