REPORT class - Group Totals Only??

Post Reply
bradmaudlin
Posts: 23
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

REPORT class - Group Totals Only??

Post by bradmaudlin »

Hello,

Is there a way to print the GROUP Totals only (not the detail lines).

Code: Select all


REPORT oReport TITLE LOGOLINE1,"INVENTORY VALUE REPORT","FOR "+DTOC(DATE()) CAPTION "Inventory Value Report" ;
        HEADER "Date: " + dtoc( date() ), ;
        "Time:  " + time(), ;
        OemtoAnsi( "Page: " ) + str( oReport:nPage, 3 ) ;
        RIGHT ;
        FONT oFont1, ;
        oFont2, ;
        oFont3 ;
        CENTERED PREVIEW

COLUMN TITLE "UPC CODE" DATA str(UPCCODE,15) LEFT
COLUMN TITLE "Description" DATA UPCDESC
COLUMN TITLE "Stock" DATA CURRENT picture "99999"
COLUMN TITLE "Cost" DATA COST picture[ 99999.99 ]
COLUMN TITLE "Ttl Cost" DATA COST*CURRENT picture "999999.99" TOTAL
COLUMN TITLE "Price" DATA PRICE picture[ 99999.99 ]
COLUMN TITLE "Ttl Price" DATA PRICE*CURRENT picture "999999.99" TOTAL

oReport:CellView()
GROUP on ( DEPT ) HEADER "Department " + str( DEPT, 4 ) + " " + SHOWDEPT( DEPT ) FOOTER "Department Total " FONT 3

end REPORT

if oReport:lCreated

    /*
          First line of title bold
          */
    oReport:oTitle:aFont[ 1 ] := { || 2 }
    /*
          Total descriptors
          */
    oReport:cGrandTotal := "Grand Total..."
    oReport:cPageTotal  := "Page Total..."
endif

IF m_Dept = 0
      ACTIVATE REPORT oReport FOR CURRENT > 0 
Else
   ACTIVATE REPORT oReport FOR (CURRENT > 0) .and. (DEPT = m_Dept)
EndIf

 
Thanks,
Brad
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REPORT class - Group Totals Only??

Post by cnavarro »

Try clausule SUMMARY

xcommand REPORT [ <oReport> ] ;
[ TITLE <bTitle, ...> [<TFmt:LEFT,CENTER,CENTERED,RIGHT>] ];
[ HEADER <bHead, ...> [<HFmt:LEFT,CENTER,CENTERED,RIGHT>] ];
[ FOOTER <bFoot, ...> [<FFmt:LEFT,CENTER,CENTERED,RIGHT>] ];
[ FONT <oFont, ...> ] ;
[ PEN <oPen, ...> ] ;
[ <lSum:SUMMARY> ] ;
[ <file: FILE, FILENAME, DISK> <cRptFile> ] ;
[ <resource: NAME, RESNAME, RESOURCE> <cResName> ] ;
[ <toPrint: TO PRINTER> ] ;
[ <toScreen: PREVIEW> ] ;
[ TO FILE <(toFile)> ] ;
[ TO DEVICE <oDevice> ] ;
[ CAPTION <cName> ]
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
bradmaudlin
Posts: 23
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

Re: REPORT class - Group Totals Only??

Post by bradmaudlin »

Thanks,

Sometimes the answer is so simple. That worked perfect.
Post Reply