Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I know when the record is the last in a group?
Message
From
19/12/2000 21:42:41
 
 
To
19/12/2000 19:48:18
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00454522
Message ID:
00455321
Views:
37
Oops I forgot to click Jorge and Mark's name so I now send again.
Jorge, in fact I don't have a "year" total, the following will show more clearly about my case.
Mark, I have tried to select all the "End of Report", "End of Page", "Month" band in the "Reset at" of the property window, all can't give my need.

Sorry that I forgot to preview my message before sent so all the data in the report I wanted to show were messed up. Now let me try your suggestion to use < PRE > to make my report look tidy.
$ received in   $ received in           Commision                  Commision
last month      this month            in last month               in this month
********************************* Nov ******************************************
10000                 0                                                                         
    0                 4500                                                                       
10000             10000                                                                      
 -----------------------------------------------------------------------------------------------------
20000             14500                     4000                              2900 <------ Total of a month, Group by month

******************************** Dec ****************************************** 
20000             10000                                                                     
    0                    0                                                                         
10000             10000                                                                      
 -----------------------------------------------------------------------------------------------------
30000             20000                     6000                              4000 <------ Total of a month, Group by month
 ----------------------------------------------------------------------------------------------------
 Total of Commision in this month:                                       9800 <------ Total should be 2900 + 4000 = 6900 in this example.
The formula to calculate the commision in this month is :
Total $ reveived = total $ received in last month + total $ received in this month
if the total $ received < 50000, the commision rate is 0.2
if the total $ received > 50000 and < 100000, the first portion of commision is 50000 x 0.2 = 10000, the second portion of commision will be x 0.25.
if the total $ received > 100000 and < 200000, .........., etc.
So the commision of this month = total commision - commision already got in last month.
For example, commision due to Nov = (20000 + 14500)*0.2 - 4000 = 2900
commision due to Dec = (30000 + 20000)*0.2 - 60000 = 4000
So the total commision in this month = 2900 + 4000 = 6900 which is the final result I want to have in my report.
Hope it is much clearer. Thanks for help. I have been studying this problem for more than a week, my mind cannot run now.
Power Wong
Every problem will have a solution, the only problem is that can you find it out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform