Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print summary in report
Message
De
08/10/2003 05:13:08
 
 
À
08/10/2003 03:53:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00836084
Message ID:
00836101
Vues:
14
>i have this report,
>
>
>
>
> April 2002
>Empno: 00001
>Day    Leave
>1        V
>2
>3        S
>4        S
>5        T
>.
>.
>.
>.
>.
>.
>30
>
>
>
>i want to print a summary of all leave type of each employee. like V = 1, S = 2, T = 1
>>leaves per employee are not the same.
>
>any idea on how i can do this?


Evelyn,

One way is run the report off a cursor and add a group (say day = 99)
select  empId, ;
        year, ;
        month, ;
        DayNr, ;
        Leave, ;
        $0       as SummaryTotal ;
   from Table ;
   into cursor tmp ;
union all ;
select   emp_id, ;
         year, ;
         month, ;
         99, ;
         Leave, ;
         ntom(count(*)) ;
    from Table ;
    group by 1,2,3,4,5 ; && maybe having  !empty(ntom(count(*)))
order by 1,2,3,4,5

add a field to the report: SummaryTotal, suppress printing when zero

report ...
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform