Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
It is not possible to sum rounded subtotals!!
Message
From
08/01/1999 17:08:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/01/1999 16:42:56
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00169097
Message ID:
00174222
Views:
32
>>Order of variables:
>>1. one to keep the group expression, initialize to non-existing value (so it is different from the first group), assign group expression
>>2. rvGroupHasChanged, initialize to .f., assign FirstVariable=GroupExpression
>>3. third one goes to keep the totals of the rounded values per person (or just for grand total)
>
>Dragan,
>
>I cannot get it to work without UDF.
>Can you provide an exact description or sample report
>how this particular case can be implemented?

I'll have to do this a bit as off the top of my head, I've done it on another machine which is sold in the meantime :). Yea, I know, I should have a backup - and I do, but I gave it to the guy who will maintain the thing.
The basic layout is like this:

first variable rvGroupExpr
inital value = non-existent value
assign value = group expression
reset at group, calculate nothing

second variable rvIsGroup
initial value .f.
assign value = rvGroupExpression # groupExpression
reset at end of report, calculate nothing

third variable, rvTotal
initial value=0
assign value = iif(rvIsGroup, < your hours total per person comes here >, 0)
calculate total, reset at outer group or end of report

You may try different ordering of the first two variables, and the initial value for the rvIsGroup - it should be .t. only when group expression changes, and the third should add only when it becomes .t., i.e. only once in a group. I think that's all - unfortunately, I can't be exactly sure if this reconstruct is quite correct. Wish I had a copy.

back to same old

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

Click here to load this message in the networking platform