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)
conditional text
burtondav
If a group field is null, I would like to print "NULL".
How would I create a conditional statement to do this?
Thanks
Find more posts tagged with
Comments
RCirne
<blockquote class='ipsBlockquote' data-author="'burtondav'" data-cid="71287" data-time="1292256098" data-date="13 December 2010 - 09:01 AM"><p>
If a group field is null, I would like to print "NULL".<br />
How would I create a conditional statement to do this?<br />
<br />
Thanks<br /></p></blockquote>
<br />
<br />
In your report design, you could insert a Dynamic Text element with the following code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if (<YOUR_FIELD> == null) {
'NULL';
}
else {
<YOUR_FIELD>;
}
</pre>
<br />
Cheers
Krelek1000
Another way IF you are using a field as the group is through a Case statement in the SQL as well...
(CASE
when field is null then 'NULL'
else field
END) field_name
I just bring that up because in programming with BIRT and Java, null value fields assigned to a row[] can be 2 things, either undefined or null...