Subgrouping

Subgrouping

Postby HunterEC » Thu Jul 04, 2013 1: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: Select all  Expand view

         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: Select all  Expand view

Customer: 1234567
   Month: 01
   Total: ....

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

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

   Month: 03
   Total: ....
Total Customer: ....
 
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Subgrouping

Postby nageswaragunupudi » Fri Jul 05, 2013 4:15 pm

Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Subgrouping

Postby HunterEC » Fri Jul 05, 2013 4:40 pm

Rao:

Thank you very much !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha, nageswaragunupudi and 105 guests