Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print summary in report
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00836084
Message ID:
00836857
Views:
8
Expanding upon something someone already suggested, try something like this:
select  empId, ;
        year, ;
        month, ;
        DayNr, ;
        Leave, ;
        0 AS Total ;
   from MyTable ;
union all ;
select   emp_id, ;
         year, ;
         month, ;
         99 as DayNr, ;
         Leave, ;
         count(*) AS Total ;
    from MyTable ;
    GROUP BY 1, 2, 3, 5 ;
order by 1,2,3,4,5 ;
INTO CURSOR MyCursor
What you can do now is add the fields to the detail band. Create a Data Group with the expression of "DayNr = 99", without the quotes. This will give you an opportunity to use the Group Header band to create some white space and add some column titles that you want printed just before the totals for an employee.

You can use Print When logic in each field in the detail band to determine which ones you want printed when it's a true detail record (DayNr <> 99) or when it's a total record (DayNr = 99).

Play around with this concept and see if it helps you get what you want.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform