I am running BIRT 2.3.2 with a JDBC Oracle connection. I am trying to set a global variable based on the value in the current datarow.
In the ON Fetch method of my dataset I have the following code and error (from Debug report):
Dec 11, 2012 11:28:14 AM org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor handleJS
WARNING: Fail to execute script in function __bm_onFetch(). Source:
" +
If (WORKORDER.WO20 > 0 )
{reportContext.setGlobalVariable("w20"),"Yes" }
Else
{ reportContext.setGlobalVariable("w20"),"No"};
+ "
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "If" is not defined. (/report/data-sets/oda-data-set[
@id="2161"]/method[
@name="onFetch"]#3)
Script source: /report/data-sets/oda-data-set[
@id="2161"]/method[
@name="onFetch"], line: 0, text:
__bm_onFetch()
Any idea what I am doing wrong?
Thanks,
Dawn