Treport row titles

Post Reply
brewster
Posts: 43
Joined: Wed Jun 20, 2012 4:07 am

Treport row titles

Post by brewster »

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: Select all | Expand

 

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: Select all | Expand

 
User avatar
Enrico Maria Giordano
Posts: 8735
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Treport row titles

Post by Enrico Maria Giordano »

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

EMG
brewster
Posts: 43
Joined: Wed Jun 20, 2012 4:07 am

Re: Treport row titles

Post by brewster »

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]
User avatar
Enrico Maria Giordano
Posts: 8735
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Treport row titles

Post by Enrico Maria Giordano »

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
brewster
Posts: 43
Joined: Wed Jun 20, 2012 4:07 am

Re: Treport row titles

Post by brewster »

Enrico,

OK, thanks I'll give it a try.

Bruce
Post Reply