My goal is to have an embedded image that changes according to a value within a crosstab cell. I am experiencing difficulty getting the value of the crosstab cell to switch the image.<br />
<br />
Using an image URI approach, the expression I would use is this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(data["dataType"] == 0) {"images/ico_visitors.gif"}
if(data["dataType"] == 1) {"images/ico_transactions.gif"}
if(data["dataType"] == 5) {"images/ico_hitrate.gif"}
</pre>
<br />
However, when using an embedded image, making it dynamic means using the script tab for the image, instead of the URI expression in the image settings. With the embedded approach, data[column_name] doesn't seem to be available.<br />
<br />
Here is what I've got at the moment:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(this.getParent().data["dataType"] == 0)
{
this.data = null;
this.imageName="ico_visitors.gif";
}
if(this.getParent().data["dataType"] == 1)
{
this.data = null;
this.imageName="ico_transactions.gif";
}
if(this.getParent().data["dataType"] == 5)
{
this.data = null;
this.imageName="ico_hitrate.gif";
}
</pre>
<br />
<br />
Here is my error message:<br />
<br />
<blockquote class='ipsBlockquote' ><p>
TypeError: Cannot read property "dataTypeDescription" from undefined (/report/body/extended-item[
@id="326"]/property[
@name="rows"]/extended-item/property[
@name="views"]/extended-item/property[
@name="levels"]/extended-item/property[
@name="member"]/extended-item/property[
@name="content"]/image/method[
@name="onRender"]#1)<br /></p></blockquote>