Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Averaging values...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00275334
Message ID:
00275355
Vues:
16
VFP won't disallow blanks because to VFP a blank numeric is zero. VFP will ignore NULL values though. If you set teh default value property for the fields to NULL then you will get what you want.

Another way to get what you want is to create two report variables (on the Report menu). One named lnSum adn the other lnCount. Set the initial value of both of these to 0 and the value to store would be;

lnSum = lnSum + IIF(Field<>0,Field,0)

lnCount lnCount + IIF(Field<>0,1,0)

Then for your average you put this expression in the report field;

IIF(lnCount=0,0,lnSum/lnCount)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform