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 03:01:11
 
 
To
23/12/1998 08:45:32
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00169097
Message ID:
00170179
Views:
33
>>>
>>>I've reread this thread, and it seems to me that this problem cannot be resolved without changing program code itself.
>>
>>Oh yes it can. I've sent Andrus a simple solution. Uses report variables and a one line .fxp
>
>Obviously, I don't know what exactly you sent, but it seems to me that the necessity to accomodate REPORT FORM FOR and WHILE clauses is really difficult to overcome.

So the answer was to have report variables, called r_sal and r_sum. Group the report by name. r_sal gets reset on name and simply sums the salary. r_sum is initialised to 0 and is not changed by the report form at all.

Two expression appear in the group footer.
1.. round(r_sal, 0)
2.. SalSum(round(r_sal, 0)) which is as follows...

* SalSum.prg
PARAMETER subTot
r_sum= r_sum + m.subTot
RETURN ''

In the final summary band we put
3.. round(r_sum)


Seems to work :-)

BTW, Merry Xmas Ed. You've worked hard on this forum and I'm sure your help is greatly appreciated.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform