Page 1 of 1

REPORT class - Group Totals Only??

Posted: Sun Aug 30, 2015 10:36 pm
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

Re: REPORT class - Group Totals Only??

Posted: Sun Aug 30, 2015 11:01 pm
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> ]

Re: REPORT class - Group Totals Only??

Posted: Mon Aug 31, 2015 12:09 am
by bradmaudlin
Thanks,

Sometimes the answer is so simple. That worked perfect.