Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem - Average is not a whole number.
Message
De
18/01/1999 17:04:46
 
 
À
18/01/1999 17:01:23
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00177228
Message ID:
00177371
Vues:
36
>>Yes - while each computation is an integer, the average is being computed by dividing the sum of the integer values by the count of the integer values in the group. You'll have to coerce the result into an integer for display purposes; this is most easily done by using a format with no decimal places. This will force the decimals to truncate rather than providing a correctly rounded integer value that more accurately reflects the mean, but it doesn't sound like that matters.
>
>Additionally, if there's a need to sum them, then we should use report variables. A simple variable which would have a value of Int(average_field), Calculate=nothing, can be used throughout the report instead of the field itself, including the places where it should appear in totals.

Absolutely the case; using a report variable and then rounding the result could be done to get an accurately-rounded mean throughout the report.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform