Information générale
Catégorie:
Gestionnaire de rapports & Rapports
Max --
One question I've had in the back of my mind.
You described the equation as: (A / (B + C + D ) )*100
But, the actual formula was (A / (A + C + D ) )*100
Are you sure you want to duplicate the function in both the divisor and dividend?
Jay
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement