To Antonio:

To Antonio:

Postby HunterEC » Mon Oct 15, 2012 9:11 am

Antonio:

Can this be done with the REPORT command ?
I got four tables:
1. Master product category
2. Master Products file
3. Product Category table (Product code & category code in this one) (Each product can have more than one category).
4. Transactions

I need a report to print this way:

Report Group 1: MASTER PRODUCT CATEGORY
Report Group 2:        PRODUCTS IN THAT CATEGORY (in alphabetical order)
Report Group 3:              TRANSACTIONS FOR EACH PRODUCT IN THAT CATEGORY

One important detail is that products should print in alphabetical order.
Thank you very much.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio:

Postby ADutheil » Mon Oct 15, 2012 3:09 pm

Gustavo,

The question was to Antonio but I think I have the answer. You´ll have to use 3 GROUP command in the right order.
GROUP ON TRANSACTION
GROUP ON PRODUCTS
GROUP ON CATEGORY

I do not remenber having used with 3 groups but with 2 it works fine. Here is a sample:
Code: Select all  Expand view

GROUP ON tmp->LOGR HEADER "LOGRADOURO: " + allTrim( oRepo:aGroups[ 1 ]:cValue ) + "-" + tmp->NLOG + "-" + tmp->BAIR + if( val( area->CODA ) >= 4, "-" + allTrim( area->NOME ), "" ) FONT 2 FOOTER ""
GROUP ON tmp->AREA + tmp->ROTA EJECT FOOTER ( SomaTiragem( nRota, aTira ) + "TOTAL ZONA " + subStr( oRepo:aGroups[ 2 ]:cValue, 1 , 6 ) + " ROT: " + subStr( oRepo:aGroups[ 2 ]:cValue, 7 ) + " (" + ;
        lTrim( str( oRepo:aGroups[ 2 ]:nCounter ) ) + " ASSINANTES ) ( " + allTrim( str( nRota ) ) + ( nRota := 0, "" ) + " JORNAIS )" ) FONT 2
 
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: To Antonio:

Postby HunterEC » Thu Oct 18, 2012 8:56 pm

André:

Great idea and much easier to implement. Obrigado. Thank you.


Gustavo
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests