For one double field in Crystal Reports, I wish to write up formula where if that field is equal to zero, it should display as "--", else the actual value should be shown.
What I have written is :
If (IsNull({View_journal.debit})) then
"--"
Else {View_journal.debit}
but the formula doesn't execute at all.
null
is not the same as 0.
Your formula should be something like
if
{View_journal.debit} = 0
then
"--"
else
ToText({View_journal.debit}, 2)
EDIT:
ToText
converts debit
value to string with 2 decimal places.