Getting "ORA-00936: missing expression" error when closing data set but report runs fine
<p>As the title states, I'm getting an "ORA-00936: missing expression" error when closing 1 of the data sets in my report, but the report runs fine. Here's the code in the query:</p>
<pre class="_prettyXprint">
select
WO_WORKORDER,
WO_DESC,
WO_ENT_DATE,
WO_STATUS,
WO_CATEGORY,
WO_REGION,
WO_FACILITY,
WO_FACILITY_DESC,
WO_BUILDING,
WO_BUILDING_DESC,
PH_STATUS,
PH_SHOP,
PH_WORK_CODE,
PH_EXTRA_DESC,
WC_DESC,
WO_DATE_COMPLETED,
WO_DEPT_DESC,
WO_DEPT_ID
from VW_WO_BILLING
where
WO_TYPE = 'F'
and WO_STATUS = 'CLOSED'
and PH_STATUS = 'CLOSED'
--and PH_SHOP = 'F-SERVICES'
and TRUNC(WO_DATE_COMPLETED) >= ?
and TRUNC(WO_DATE_COMPLETED) <= ?
and (WO_DEPT_ID in ('ddd') or ? = 'ALL')
and (PH_WORK_CODE in ('abc') or ? = 'ALL')
and (WO_CATEGORY in ('xyz') or ? = 'ALL')</pre>
<p>and here's the beforeOpen script:</p>
<pre class="_prettyXprint">
this.queryText = this.queryText.replace("ddd", params["Department"].value.join("','"));
this.queryText = this.queryText.replace("abc", params["WorkCode"].value.join("','"));
var inArg = params["Category"].toString();
inArg = inArg.replace("F-CIP","'F-CIP','C-CIP'");
inArg = inArg.replace("F-CM","'F-CM','C-CDN','F-FMN','M-CM'");
inArg = inArg.replace("F-DAMAGE","'F-DAMAGE','M-DAMAGE'");
inArg = inArg.replace("F-DISASTER","'F-DISASTER','M-DIS'");
inArg = inArg.replace("F-EST","'F-EST','C-EST','M-EST'");
inArg = inArg.replace("F-FPM","'F-FPM','C-CPM','M-PM'");
inArg = inArg.replace("F-MAC","'F-MAC','C-CDB','F-FMB','M-MAC'");
inArg = inArg.replace("F-PMB","'F-PMB','M-PMB'");
inArg = inArg.replace("F-SPT","'F-SPT','M-SPT'");
inArg = inArg.replace("F-TRN","'F-TRN','M-TRN'");
this.queryText = this.queryText.replace("'xyz'",inArg);</pre>
<p>It's not a huge deal I suppose, if the report runs fine, but I'd rather resolve it if possible. It's annoying any time I'm working on the report to get that error message every time I click through the various windows in the data set, or when I try to close.</p>
<p> </p>
<p>Any ideas what's causing it?</p>
<p> </p>
<p> </p>
<p> </p>