Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum at my report
Message
From
16/09/2004 17:39:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/09/2004 14:40:45
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00943063
Message ID:
00943127
Views:
18
To sum for all departments, create a data group for "Department". Then, copy the field from the detail band to the group footer, and either:

1) Set the option for sum, or

2) Create a report variable (with the option to sum), and use this variable in the group footer.

>hi all,
>
>any idea, i use vfp5
>
>at this code under,i get all section as..
>
>section
>aa 66 25...
>bb 23 33...
>cc 23 55... for department 1
>i need to sum totals at my report for every department &&this what i need
>.
>.
>.
>. for department 2
>.
>.
>.
>.
>
>
>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.
>m.qasem
>
>
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform