>Hi all
>
>I've noticed that when generating reports, VFP takes a blank field as a zero - which effects the average of the values at the end of a report I'm generating. Does anyone know a simple way to get around this - I've been exporting the tables to Excel, which simply ignores the blank fields (for the purposes of averaging)...but I'm quickly getting sick of doig it this way.
>
>Thanks in advance...
>
>
>Chris Kable
>FuelTrac
Don't use Foxpro's native average calculation. Instead, use report variables to calculate your own average. Have one variable, nSum, that has an expression of IIF(
<> 0, , 0) and has "SUM" marked as the calculation. Then create another variable, nCount, that has an expresion of IIF( <> 0, 1, 0) and mark "SUM" as the calculation. When you are ready to print the average, create an expression that is "nSum / nCount".
It's more work on your part, but it will work.
Cathy