how to make variable "null" to zero when printing

i have below query...i want to show zero instaed of null.

i tried with different datatypes for last two variables


sagarnikam123's picture
Joined: Nov 1 2012 - 10:33pm
Last seen: 4 years 10 months ago

1 Answer:

for last two column write a condition that


ajinkya_c's picture
Joined: Aug 29 2012 - 6:13am
Last seen: 6 years 6 months ago

@ajinkya_c,but where to add this condition.can u specify by seeing related file attached.

sagarnikam123 - 10 years 10 months ago

Whatever you use table or crosstab
Add this condition in field value expression.
e.g. $F{Net services provided by physician}==null? 0:$F{Net services provided by physician}

ajinkya_c - 10 years 10 months ago

@ajinkya_c,thanks it works

sagarnikam123 - 10 years 10 months ago
show 1 more...

I think so it should be in these way $F{Field}=/null?0:$F{Field} rather then in these $F{Field}==null?0:$F{Field}.

henryesteban - 10 years 2 months ago