Yeah, you're mixing data types in the output of the formula, the 1st condition is numeric, the second a string, you can't do that.
Try:
if not isnull({deptname}) then
{AMOUNT}
else
0
Then right click the formula and select format field->X 2 next to suppress, and palce:
{@MyFormula} = 0
Or you can convert it all to text:
if not isnull({deptname}) then
totext({AMOUNT},2,"")
else
""
The first solution allows for still using the field as a numeric so it's probably the way to go.
-k