Hello,
i need to set "Help Text" of an caption to an dynamic value (expression).
"Help Text" is a static field so i decided to create a "Named Expression" with called "test" with the expression "row["CUSTOMERNAME"]".
in the onPrepare Event of the label set:
this.helpText = reportContext.evaluate(this.getNamedExpression('test'))
if i run the report i get an error:
There are errors evaluating script "this.helpText = reportContext.evaluate(this.getNamedExpression('test'))":
Wrapped org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "row["CUSTOMERNAME"]":
ReferenceError: "row" is not defined. (<inline>#1). (/report/body/table[
@id="10"]/detail/row/cell[
@id="16"]/data/method[
@name="onPrepare"]#1)
i unterstand the error. the reportContext does not know anything of the row.
i must evaluate the expression in the context of the row or the reportitem(caption) but how can i do that?
kind regards
p.c.squirrel