<p>When using an aggregate control in some reports you would prefer to see a blank field instead of 0.  There does not appear to be a way to do this automatically.  Does anyone have a way that this can be done.  Note, you want to maintain the '0' value for the field in cases when you export, but you want to show a blank when rendering to PDF or HTML.</p>

[{'answer_id': 56976, 'author': 'Scott Rosenbaum', 'author_id': 5412, 'author_profile': 'https://Stackoverflow.com/users/5412', 'pm_score': 3, 'selected': False, 'text': "<p>There are a number of ways to solve this.  The two primary are to use either visibility rules or highlights to create conditional formatting.  The visibility is particularly attractive since it is easy to only apply the format rules to particular types of output (e.g. HTML).</p>\n\n<p>For this particular case, there are two problems with these approaches.  First, I want a general solutions where I don't have to specify the text color.  In other words, when the condition is true (value of 0) then I want my text color to match the background color.  In that way if someone changes the backgroundColor for the control, the code still works.</p>\n\n<p>The other issue is that in this case I am using dynamic column binding which does not support value lookup.</p>\n\n<p>The solution that I created was to add a JavaScript function called hideMe as shown below.  </p>\n\n<pre><code>function hideText (dataControl){\n    if (dataControl.getValue() == 0) {\n        var color = dataControl.getStyle().getBackgroundColor();\n        var parentItem = dataControl.getParent();\n        do {\n            if (color == null &amp;&amp; parentItem != null) {\n                color = parentItem.getStyle().getBackgroundColor();\n                parentItem = parentItem.getParent();\n            } else {\n                break;\n            }\n\n        } while (color == null);\n        dataControl.getStyle().color = color;\n    }\n}\n</code></pre>\n\n<p>Once this function has been added to the report (in my case an included javascript file) I just call it from the OnCreate method of the control.</p>\n\n<pre><code>hideText(this);\n</code></pre>\n\n<p>This can also be done using Java Event Handlers but this method seems to be easier.</p>\n"}, {'answer_id': 3710737, 'author': 'Scott Rosenbaum', 'author_id': 5412, 'author_profile': 'https://Stackoverflow.com/users/5412', 'pm_score': 2, 'selected': True, 'text': '<p>Just an FYI, after working with this for a while longer, I have found that it is just easier to use Visibility rules.  The one big advantage is that you can easily configure different visibility for different output formats.  So for PDF it may be best to use blanks, but for Excel you may want the 0 values.</p>\n'}]
['https://Stackoverflow.com/questions/56723', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5412/']