FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How can I print after Grand Total in Report ?
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
How can I print after Grand Total in Report ?
Posted: Tue May 09, 2006 07:37 AM

Hello All,

I want to print a few lines after Grand Total using Report Class. I tried using POSTEND clause but without success. I know that postend should work, but I am missing something.

Can somebody give me an example to print following two lines after Grand Total :
Line-1 Details...........
Line-2 Details...........

TIA
Milan.

Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Re: How can I print after Grand Total in Report ?
Posted: Tue May 09, 2006 09:58 AM
Milan Mehta wrote:Hello All,

I want to print a few lines after Grand Total using Report Class. I tried using POSTEND clause but without success. I know that postend should work, but I am missing something.

Can somebody give me an example to print following two lines after Grand Total :
Line-1 Details...........
Line-2 Details...........

TIA
Milan.


Milan hi,

     ACTIVATE REPORT oReport WHILE (nPt <= len(uArray)) ;
        ON END (oreport:ltotal:= .T., LastDaTable()) 

// (You may skip the report totals by changing .T. to .F. above)
// The above is extracted from printing an multidimentional array,
// but can be used for regular database fields.
...
...


Function LASTDATABLE()
*---------------------
LOCAL nAlign := 2    // 2= right, 1= left, 0= center

oReport:Separator(1, oReport:nRow)

   // Syntax:  Col.No., String,     font, align
   oReport:Say(1,   "Details") , 2,      1)    // Column 1 (Align left)
   oReport:Say(2,       "   "     , 2,      0)    // Column 2 (Align center)

   oReport:Say(7, str(nTtlCharge,12,2), 2, nAlign) 
   oReport:Say(8, str(nTtlGTotal,12,2),  2, nAlign) 
   oReport:Say(9, str(nTtlRateKg,12,2), 2, nAlign)

oReport:NewLine()

Return NIL


I hope the above will help you...
Kind regards
Evans

Continue the discussion