Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
It is not possible to sum rounded subtotals!!
Message
De
24/12/1998 03:01:11
 
 
À
23/12/1998 08:45:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00169097
Message ID:
00170179
Vues:
34
>>>
>>>I've reread this thread, and it seems to me that this problem cannot be resolved without changing program code itself.
>>
>>Oh yes it can. I've sent Andrus a simple solution. Uses report variables and a one line .fxp
>
>Obviously, I don't know what exactly you sent, but it seems to me that the necessity to accomodate REPORT FORM FOR and WHILE clauses is really difficult to overcome.

So the answer was to have report variables, called r_sal and r_sum. Group the report by name. r_sal gets reset on name and simply sums the salary. r_sum is initialised to 0 and is not changed by the report form at all.

Two expression appear in the group footer.
1.. round(r_sal, 0)
2.. SalSum(round(r_sal, 0)) which is as follows...

* SalSum.prg
PARAMETER subTot
r_sum= r_sum + m.subTot
RETURN ''

In the final summary band we put
3.. round(r_sum)


Seems to work :-)

BTW, Merry Xmas Ed. You've worked hard on this forum and I'm sure your help is greatly appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform