Post
by brewster » Thu Feb 26, 2015 7:06 pm
Enrico, Appreciate your reply. I think the " Totals..." that appear at the report row beginning happens automatically when using the TOTAL clause of a column. I attach the program where it is used. Bruce [code] USE (cPath_seg + cFil ) alias VP NEW cOurAlias := alias() dBeg := what_beg_date() dEnd := what_end_date() INDEX ON VP->V_ACCT + DTOS(VP->V_DTE) TO ( cPath_seg + 'VACCT' ); FOR dtos( VP->V_DTE ) >= DTOS(dBeg) .and. dtos(VP->V_DTE)<= dtos(dEnd) Count to nScop_rec FOR dtos( VP->V_DTE ) >= DTOS(dBeg) .and. dtos( VP->V_DTE )<= dtos(dEnd) dbgotop() REPORT oReport TITLE " ", "*** Vis Summary Treport ***", " " ; FONT oFont1, oFont2 ; HEADER "For - " + dtoc(dBeg) + ' to ' + dtoc(dEnd)+ ; space(20) + trans(nScop_rec,'99999') + space(3) + 'records'; PREVIEW CAPTION " Vis Summary Treport" // enables the print to Excel option oReport:bInit := { || (cOurAlias)->( DbGoTop() ) } COLUMN TITLE "Cost" ; DATA VP->V_CST ; TOTAL ; PICTURE ' ' + '999999.99' COLUMN TITLE "Gst" DATA VP->V_GST ; TOTAL ; PICTURE '99999.99' COLUMN TITLE "Pst" DATA VP->V_PST ; TOTAL ; PICTURE '99999.99' COLUMN TITLE " Amount " ; DATA VP->V_AMT ; TOTAL ; RIGHT ; PICTURE "999999.99" COLUMN TITLE "CR" DATA VP->V_CR ; TOTAL ; PICTURE '999999.99' COLUMN TITLE "Acct" DATA VP->V_ACCT COLUMN TITLE "Card" DATA VP->V_CARD COLUMN TITLE "Code" DATA VP->V_CODE GROUP ON VP->V_ACCT END REPORT oReport:lSummary := .T. oReport:nTitleUpLine := RPT_NOLINE oReport:nTitleDnLine := RPT_SINGLELINE oReport:aColumns[4]:bTitleFont := {|| 2 } ACTIVATE REPORT oReport CLOSE VP oFont1:End() oFont2:End() Endif // rpt_dates [code]