Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum at my report
Message
From
17/09/2004 14:35:56
 
 
To
16/09/2004 17:39:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00943063
Message ID:
00943566
Views:
17
hi,
thank you,

i make sum for all departments at my report,

but i need to sum the total for evry department,at table (temper1),via my code under
close all
set safety off
select 50
set excl on
use temper1
zap
select 50
set excl off
use temper1
delete

select 32
use alldivi

do while .t.
 m.dept=nam
 select 28
 use salar
 set filter to m.dept=divi

 sum nettot to m.s for m.dept=divi
 sum cut5 to m.w1 for m.dept=divi
 sum cut4 to m.w2 for m.dept=divi
 sum cut3 to m.w3 for m.dept=divi
 sum cut2 to m.w4 for m.dept=divi
 sum cut1 to m.w5 for m.dept=divi
 sum vfound1 to m.w6 for m.dept=divi
 sum vfound2 to m.w7 for m.dept=divi
 sum vdisc to m.w8 for m.dept=divi
 sum totaladd to m.w9 for m.dept=divi
 sum msal to m.w10 for m.dept=divi
 SUM THERA TO M.W11 for m.dept=divi
 SUM SUBER TO M.W12 for m.dept=divi
 SUM TRANP TO M.W13 for m.dept=divi
 SUM SOCI TO M.W14 for m.dept=divi
 SUM TAX1 TO M.W15 for m.dept=divi
 SUM ALLAD TO M.W16 for m.dept=divi
 SUM TOTEXTRA TO M.W17 for m.dept=divi

  select 50
   *use temper1
    if m.s>0
    append blank
      replace dept with m.dept
      replace ms with m.s
      replace cut5 with m.w1
      replace cut4 with m.w2
      replace cut3 with m.w3
      replace cut2 with m.w4
      replace cut1 with m.w5
      replace vfound1 with m.w6
      replace vfound2 with m.w7
      replace vdisc with m.w8
      replace totaladd with m.w9
      replace msal with m.w10
      replace THERA with m.w11
      replace SUBER with m.w12
      replace TRANP with m.w13
      replace SOCI with m.w14
      replace TAX1 with m.w15
      replace ALLad with m.w16
      replace TOTEXTRA with m.w17
     *if m.dept<>divi
 endif
    select 32
     skip
    m.dept=nam
if eof()
  exit
endif
 
enddo
*m.s=0
select 50
report form al preview
thanks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform