how to make variable "null" to zero when printing

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

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: 3 years 7 months ago

1 Answer:

for last two column write a condition that


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

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

sagarnikam123 - 9 years 7 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 - 9 years 7 months ago

@ajinkya_c,thanks it works

sagarnikam123 - 9 years 7 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 - 8 years 11 months ago