Page 1 of 1

Treport row titles

Posted: Thu Feb 26, 2015 5:14 pm
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

 
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

 

Re: Treport row titles

Posted: Thu Feb 26, 2015 5:54 pm
by Enrico Maria Giordano
Probably I'm missing it, but I can't find the string "Totals..." in any of the FWH files... :?:

EMG

Re: Treport row titles

Posted: Thu Feb 26, 2015 7:06 pm
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: Select all

  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]

Re: Treport row titles

Posted: Thu Feb 26, 2015 7:21 pm
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

Re: Treport row titles

Posted: Thu Feb 26, 2015 8:13 pm
by brewster
Enrico,

OK, thanks I'll give it a try.

Bruce