Page 1 of 1

How can I print after Grand Total in Report ?

PostPosted: Tue May 09, 2006 7:37 am
by Milan Mehta
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.

Re: How can I print after Grand Total in Report ?

PostPosted: Tue May 09, 2006 9:58 am
by E. Bartzokas
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,

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