FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Treport row titles
Posts: 43
Joined: Wed Jun 20, 2012 04:07 AM
Treport row titles
Posted: Thu Feb 26, 2015 05:14 PM
When displaying a Treport summary, I would like to turn off the automatically displayed "Totals..." as shown and replace them with row titles.

Is it possible ?

If so, what is the syntax ?

Thanks,
Bruce

FWH 14.11
Harbour 3.2.0dev ( r1406271520 )
BCC582

Code (fw): Select all Collapse

Current

Cost
Total.... 253.46
Total.... 146.52

I would like row titles as such e.g.
Cost
Parts 253.46
Supplies 146.52

Code (fw): Select all Collapse
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Treport row titles
Posted: Thu Feb 26, 2015 05:54 PM

Probably I'm missing it, but I can't find the string "Totals..." in any of the FWH files... :?:

EMG

Posts: 43
Joined: Wed Jun 20, 2012 04:07 AM
Re: Treport row titles
Posted: Thu Feb 26, 2015 07: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]
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Treport row titles
Posted: Thu Feb 26, 2015 07:21 PM

I found one occurrence of the string "Total..." (not "Totals...") in rgroup.prg. So it belongs to the GROUP command and you can override it with the FOOTER clause of the GROUP command.

EMG

Posts: 43
Joined: Wed Jun 20, 2012 04:07 AM
Re: Treport row titles
Posted: Thu Feb 26, 2015 08:13 PM

Enrico,

OK, thanks I'll give it a try.

Bruce

Continue the discussion