Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grouping in reports
Message
From
18/08/1999 12:48:47
 
 
To
18/08/1999 09:53:17
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00254954
Message ID:
00255072
Views:
19
>DATE, HOURS, CODE, ACCOUNT
>1/1/99, 10, A, 123456
>1/2/99, 15, B, 789123
>1/3/99, 8, A, 123456
>1/4/99, 5, B, 951753
>
>TOTALS:
> 18, A, 123456
> 15, B, 789123
> 5, B, 951753
>
>How do I acheive to get the TOTALS: grouped as they are in the above example? To complicate it even futher the user selects a date range.
>For example 1/1/99 to 1/2/99 OR 1/1/99 to 1/4/99.
>
>Thanks in advance for any help.
>
>Sanjay

For your date ranges, (adding to Nick's reply):
<B>ldBegin = {^1999/01/01}
ldEnd = {^1999/01/04}</B>
SELECT sum(hours), code, account ;
       FROM myTable ;
       <B>WHERE BETWEEN(date,ldBegin,ldEnd)</B> ;
       GROUP BY account
BTW, you really shouldn't use the reserved word DATE as a field name.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform