Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
It is not possible to sum rounded subtotals!!
Message
From
24/12/1998 15:16:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/12/1998 15:53:44
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00169097
Message ID:
00170374
Views:
35
>For example, I have the following table (for simplicity, I assume
>all salaries are equal to 1.4, actually there are may different records):
>
>Person Salary
>------------------
>Edward 1.4
>Edward 1.4
>Michael 1.4
>Michael 1.4
>Paul 1.4
>Paul 1.4
>
>I want to display the sum of each person rounded subtotals in summary
>band.
>I'm capable, using report variable, to display the sum each
>person's rounded salary.
>But it seems that it is not possible to sum those rounded subtotals
>to produse number 9.
>I want the following output:
>
>Person Salary
>-----------------
>Edward 3 person's group footer
>Michael 3 person's grou footer
>Paul 3 person's grou footer
>------------
>Total 9 summary band
>
>How to produce the line "Total 9" in report?

You'll need several report variables. One would have to keep the group expression, and be initialized to some impossible value. The other one would be .t. if this one is different from the group expression (signal of new group). Third one would keep the group totals of the hours added only when the second one is .t. (something like iif(rvGroupHasChanged, RoundedPersonsSalary, 0), summing (calculate=sum, initial=0). In the summary of the report, print this third variable.

This is tricky to do, and it's specially tricky to take care of order of creation of these variables, but it's feasible. I know I've done one like that lately, and eventually got it to work after few retries.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform