Project: Birt
Bug 204396 [Automation][Regression]getFullYear will lead the exception when preview
Reported: 2007-09-23 21:19:21 | Status: closed fixed

Description: [Automation][Regression]getFullYear will lead the exception when preview Build number: 2.2.1.v20070924-0630 Steps to reproduce: 1, New a Dataset from ORDERS 2, New a data item binding with the dataset 3, Specify the expression to : row["ORDERDATE"].getFullYear() 4, Preview Expected result: The getFullYear can return the number of the year Actual result: Exception occurs Error log: data.engine.BirtException ( 1 time(s) ) detail : org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: TypeError: getFullYear is not a function. Script source: null, line: 0, text:<compiled script>. See next exception for more information.Error evaluating Javascript expression. Script engine error: TypeError: getFullYear is not a function. Script source: null, line: 0, text:<compiled script> at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118) at org.eclipse.birt.data.engine.expression.BytecodeExpression.evaluate(BytecodeExpression.java:53) at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateCompiledExpression(ExprEvaluateUtil.java:207) at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateCompiledExpression(ExprEvaluateUtil.java:226) at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateExpression(ExprEvaluateUtil.java:68) at org.eclipse.birt.data.engine.impl.BindingColumnsEvalUtil.evaluateValue(BindingColumnsEvalUtil.java:217) at org.eclipse.birt.data.engine.impl.BindingColumnsEvalUtil.getColumnsValue(BindingColumnsEvalUtil.java:180) at org.eclipse.birt.data.engine.impl.ResultIterator.prepareCurrentRow(ResultIterator.java:604) at org.eclipse.birt.data.engine.impl.ResultIterator.next(ResultIterator.java:373) at org.eclipse.birt.report.engine.data.dte.QueryResultSet.next(QueryResultSet.java:155) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80) at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:74) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:33) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:85) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:

Files changed in fix:
core/org.eclipse.birt.core/src/org/eclipse/birt/core/script/JavascriptEvalUtil.java