Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum at my report
Message
De
17/09/2004 21:44:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/09/2004 14:35:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00943063
Message ID:
00943682
Vues:
14
>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

So, is your code working, or not? If not, what is missing?

>
>
>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform