Project: Birt
Bug 203642 Javascript functions in datasets are not recognized
Reported: 2007-09-17 15:19:24 | Status: resolved fixed

Define a javascript function foo(x) in a script aaa.js Include the script through <list-property name="includeScripts"> <property>aaa.js</property> </list-property> In your dataset, create a computed column on a row X using foo(x) For example, <list-property name="computedColumns"> <structure> <property name="name">X_computed</property> <expression name="expression">foo(row["X"])</expression> <property name="dataType">Any</property> </structure> </list-property> Now try to bind a chart to this dataset, errors pop up in the dataset editor: An error occurred during population of data.

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/DataSetProvider.java UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/DummyEngineTask.java UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/SelectValueFetcher.java data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/QueryExecutionHelper.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/DteDataEngine.java