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)
dynamic hyperlink problem
msp
<p>Hi All,</p><p> </p><p>I have table in which i want to show count in a column.</p><p>I have a drill-through for this column.</p><p>But the problem is if the count is 0 i donot want to show the hyperlink.i.e. if the count is greater than 0 then and then only the hyperlink should be visible.</p><p>Is this possible in birt? If possible then how?</p><p> </p><p> </p><p>Thanx in advance</p>
Find more posts tagged with
Comments
micajblock
<p>write this script on the onRender event of the control:</p><p> </p><div><pre class="_prettyXprint">if (this.getValue() == 0) { this.action = null;}</pre></div>
SyN
<p>Hi msp,</p><p> </p><p>depending on your type of field in the column (dynamic text?), i guess the easiest solution should be to wrap your hyperlink generation in an if clause, like:</p><p> </p><p>if (row["count"].value != "0") {
<hyperlink>
}
else {
""
}</p><p> </p><p> </p><p>EDIT: mblock was faster.
</p>
SyN
<p>You can even do it without scripting by using the Visibility properties tab and an expression like row["count"] != 0.</p>
micajblock
<blockquote class="ipsBlockquote" data-author="SyN" data-cid="126679" data-time="1394619155"><div><p>You can even do it without scripting by using the Visibility properties tab and an expression like row["count"] != 0</p></div></blockquote><p>Bit that will not show the data item completely. I think the original questions was just not to have a hyperlink if the value was 0.</p>
SyN
<p>I suppose the hyperlink is displayed in an explicit "dynamic text" field. When that field is only displayed when the count is not zero that should match the needs, doesn't it? Like, show the data but not the link? Or am i getting something wrong?</p>
micajblock
<blockquote class="ipsBlockquote" data-author="SyN" data-cid="126682" data-time="1394620308"><div><p>I suppose the hyperlink is displayed in an explicit "dynamic text" field. When that field is only displayed when the count is not zero that should match the needs, doesn't it? Like, show the data but not the link? Or am i getting something wrong?</p></div></blockquote><p>Why "dynamic text" and not just a regular data item with a hyperlink property?</p>
SyN
<p>You're right, i've never done anything with hyperlinks.
But should work too, shouldn't it? Make that specific field invisible with a certain condition?</p>
micajblock
<p>Not the field just the hyperlink (which is what my code above does. </p>
SyN
<p>Ok, think i got it.
</p>