<p>Hello All,</p>
<p> </p>
<p>I am trying to import the following: </p>
<pre class="_prettyXprint">
importPackage( Packages.org.eclipse.birt.report.engine.api.script.element );
importPackage( Packages.org.eclipse.birt.report.model.api.simpleapi );
</pre>
<p>To enable this function:</p>
<pre class="_prettyXprint _lang-">
function addFilterItem (table, rowExpr, paramExpr){
var filterCondition = StructureScriptAPIFactory.createFilterCondition();
filterCondition.setOperator("like");
filterCondition.setExpr(rowExpr);
filterCondition.setValue1(paramExpr);
var filterKey = filterCondition.getStructure();
var filterItem = SimpleElementFactory.getInstance().createFilterCondition( filterKey );
table.addFilterCondition(filterItem);
}
</pre>
<p>However, during the runtime of the report I am given this error: </p>
<pre class="_prettyXprint _lang-">
A BIRT exception occurred. See next exception for more information. TypeError: Cannot find function addFilterCondition in object org.eclipse.birt.report.engine.script.internal.instance.DataSetInstance@21bfa732. (/report/data-sets/oda-data-set[
@id="372"]/method[
@name="beforeOpen"]#14).
</pre>
<p>All of the scripting is located in the dataSet beforeOpen script. I am new to the BIRT scripting environment and have minimal Java experience. Could someone please assist me with this issue? I can provide more information if needed.</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Mark</p>