Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
how to get image file name of dynamic image taken from data set
mefrack
<p>Hello,</p><p> </p><p>At first I have to mention that I am new at Java Script and birt report designer. What I am trying to do is to modify an existing layout by hiding rows if a specific image is found in indicated cell. Image source is taken from dataset. Please see the attached file.</p><p> </p><p>Hence I would like to add following lines to onCreate event of image object. Row hiding works without any condition but I could not get the name of image file.</p><p> </p><p>It would be great if anybody could help.</p><p> </p><p> </p><p>
onCreate
</p><p> </p><p><strong class='bbc'>if</strong> (<strong class='bbc'>this</strong>.?? == "r_outadd_ov.gif") //comparison method may change?</p><p><strong class='bbc'>this</strong>.getParent().getParent().getStyle().display = "none" //(Row<--Cell<--Image)</p><p> </p><p>
</p><p> </p><p> </p><p> </p><p> </p>
Find more posts tagged with
Comments
BRM
<p>Its not exactly clear what you are trying to have happen here but if the image source is from the dataset like you say then couldn't you get the name from there and do the row hiding based on some boolean value you compute in the dataset?</p>
mefrack
<p><em>Thank you for your answer, since data source is a library I can not make any modification in it. I can only add scripts to the report design.</em></p><p> </p><p><em>Hence, I tried a new approach for the condition of hiding rows today. If any of Column 5, 6 and 7 are shown in attached 'screenshot' file do not include any data I would hide the indicated row. So I modified the onCreate event of related row as shown in attached 'screenshot2'. However I got illustrated warning.</em></p><p> </p><p><em>Could you please help me about how I should write expression in </em></p><p><em>getExpressionValue method?</em></p><p><em> </em></p><p><em> </em></p><p><em><strong class='bbc'>this</strong>.getRowData().getExpressionValue("CustName") --> OK</em></p><p><em><strong class='bbc'>this</strong>.getRowData().getExpressionValue([color=#ff0000;]"row["PropertyDiffDataSet<span class='bbc_underline'>:</span>:rightValue"]"[/color]) --> Not OK</em></p>
kclark
<p>What error are you getting with the second script? Looking at it, it should be something like this</p><pre class="_prettyXprint">this.getRowData().getExpressionValue(row["PropertyDiffDataSet::rightValue"])</pre>