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 suppress error messages
evgenyak
I have a report with a chart and a table.<br />
Sometimes, values in the table are all zeroes.<br />
In such case, chart is not displayed (which is ok), but instead I get an error message<br />
<br />
<span style='color: #FF0000'>The following items have errors:<br />
Chart (id = 122):<br />
<br />
+Divide by 0</span><br />
<br />
Is it possible to suppress this error message?
Find more posts tagged with
Comments
mwilliams
Wouldn't it be easier to handle the case of dividing by 0 in your expression that this is happening in? This would eliminate the error and you could control what is output if the value is 0.
evgenyak
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97567" data-time="1331582320" data-date="12 March 2012 - 12:58 PM"><p>
Wouldn't it be easier to handle the case of dividing by 0 in your expression that this is happening in? This would eliminate the error and you could control what is output if the value is 0.<br /></p></blockquote>
<br />
I'm not sure if I can do that.<br />
<br />
I have an SQL which returns zeroes and I'm OK with it.<br />
The report has chart (bar) and table both displaying the same data.<br />
<br />
I'm just trying to understand why table has no problem to display zeroes while the chart in fact fails (I would not mind to receive an empty chart in such case)
mwilliams
You could put the following script in a HTML text box in your report:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script language="JavaScript">
document.getElementById('error_icon0_0').parentNode.parentNode.parentNode.style.display = "none";
</script>
</pre>
evgenyak
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97610" data-time="1331655722" data-date="13 March 2012 - 09:22 AM"><p>
You could put the following script in a HTML text box in your report:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script language="JavaScript">
document.getElementById('error_icon0_0').parentNode.parentNode.parentNode.style.display = "none";
</script>
</pre></p></blockquote>
<br />
Thanks!! I'll give it a try
bgbaird
If the zero division error is in data, you could use the "safeDivide" function.