There is a syntax error...You are missing :
. Change like this.
numbervar cnt;
cnt := 1;
if {MyReport;1.Cash_deposit} <> 0.00 then
cnt := cnt +1;
Approach 1:
Why are you taking this formula instead you can use in below way.
if {MyReport;1.Cash_deposit} <> 0.00 then
{MyReport;1.Cash_deposit};
Approach 2:
Supress the filed when count is zero
on supress
formula of the section write below code:
if {MyReport;1.Cash_deposit} = 0.00 then
true
else false