Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print summary in report
Message
From
08/10/2003 05:13:08
 
 
To
08/10/2003 03:53:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00836084
Message ID:
00836101
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform