I don't know about the passing null as zero (does it display in the subreport as a null or as 0?). Crystal has the option of setting nulls to defaults, which might be happening, though as I think about it, it is probably that a numbervar cannot be NULL, so it is setting it to 0.
I am not sure if this will work, but it is what I would try...
Calculate the Average yourself, you would just need an accumulator and the count. Now this won't change the results...yet. What if you changed the numbervar to a stringvar and...
Shared StringVar myTotal;
myTotal :=""
else
Now in your main report you could do something like:
shared numbervar totCount;
shared numbervar totAmount;
shared stringvar myTotal;
if myTotal <> "" then (
totCount := totCount +1;
totAmount := totAmount + VAL(myTotal)
)
just a thought...
Hope it helps