How can I print after Grand Total in Report ?

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

How can I print after Grand Total in Report ?

Post 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.
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

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

Post 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

     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
Post Reply