FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Subgrouping
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Subgrouping
Posted: Thu Jul 04, 2013 01:15 AM
Guys:

How can I have more than one group subtotals in a report ?
With the following code I get subtotals for each change in Key1 but not for changes in Tr_date (index key: Key1 + DTOS(Tr_date)):
Code (fw): Select all Collapse
         GROUP ON Key1 HEADER "Customer: " + cValue

         GROUP ON LEFT(DTOS(Ss_date),6) HEADER "Month: " + STR(MONTH(Tr_date),2)


Here's the sample data:
1234567 01/15/2012
1234567 01/20/2012
1234567 02/20/2012
7654321 02/20/2012
7654321 03/20/2012

The report should display:
Code (fw): Select all Collapse
Customer: 1234567
   Month: 01
   Total: ....

   Month: 02
   Total: ....
Total Customer: ....

Customer: 7654321
   Month: 02
   Total: ....

   Month: 03
   Total: ....
Total Customer: ....
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Subgrouping
Posted: Fri Jul 05, 2013 04:15 PM
Code (fw): Select all Collapse
GROUP ON Key1 + LEFT(DTOS(Ss_date),6) HEADER "Month: " + STR(MONTH(Tr_date),2)
GROUP ON Key1 HEADER "Customer: " + cValue
Regards



G. N. Rao.

Hyderabad, India
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Subgrouping
Posted: Fri Jul 05, 2013 04:40 PM

Rao:

Thank you very much !

Continue the discussion