Hello all,<br />
<br />
I am trying to set a column value to an external hyperlink (i.e. a URL on the web). I know that to do this, you insert the following script in the onRender event of the data element:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var myaction = this.createAction();
myaction.setHyperlink(this.getValue(),"_blank");
this.action = myaction;</pre>
<br />
However, when I do this, the following exception is thrown<br />
<br />
<span style='color: #FF0000'>Cell (id = 97):<br />
+ There are errors evaluating script "var myaction = this.createAction();<br />
myaction.setHyperlink(this.getValue(),"_blank");<br />
this.action = myaction;":<br />
TypeError: Cannot find function createAction in object org.eclipse.birt.report.engine.script.internal.instance.CellInstance@78097b. (/report/body/table[
@id="83"]/detail/row[
@id="92"]/cell[
@id="97"]/method[
@name="onRender"]#1)</span><br />
<br />
Looking at the source code, I can see that org.eclipse.birt.report.engine.script.internal.instance.CellInstance has no createAction() method, but that org.eclipse.birt.report.engine.script.internal.instance.DataItemInstance does.<br />
<br />
I have a second report which succesfully creates the URL using the above approach, and that works fine - the difference is that in the broken report, my URL string is in a CellInstance, whilst in the 'good' report, it's in a DataItemInstance. I can't work out what I've done differently in the broken report. Can anyone please tell me how I can change a CellInstance to a DataItemInstance?<br />
<br />
Thank you,<br />
<br />
Clive