General information
Category:
Reports & Report designer
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only