Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Percentage calculation in expression of report
Message
 
À
30/11/2001 13:30:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00588031
Message ID:
00588184
Vues:
42
Hi Jay,
I took the second route as I didn't know how to carry out the first one.
The report opens but the result is still 0. When I calculate by hand what the result should be I get 78.2 as the result.
Thanks
Max
> Max --

> You could go a couple ways.

> My natural preference would be to calculate this before running the report, if you need it calculated once as the sum of the records.

> In the report, substitute nmyTempPublicCalc for calls to Calcrpt().

> Then couch your call to the report with this code.

> PUBLIC nmyTempPublicCalc
> CALCULATE SUM (Calcrpt()) FOR FilterUsedOnReport TO nmyTempPublicCalc

> REPORT FORM ....

> RELEASE nmyTempPublicCalc

> There are more sophisticated ways of defining the scope of the variable, but this should get the job done. This is probably faster than the next option.

> Another way would be to define a report variable MyCalc (or whatever). Check the "Sum" line in the Calculate box. Then, in Value to Store, put in Calcrpt(). Then, use the MyCalc variable in place of the function call. This is probably simpler than the first option.

> HTH!

> Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform