Yes, I see what you want.
Is your details grid ReadOnly or users may edit fields, add and delete records?
In case it is ReadOnly you may use cursor with last record containing totals as a source for the grid. That cursor may be result of some SELECT .. UNION SELECT .. statement. For sample:
Select ItemDescr, Sum1, Sum2, Sum3 From SomeTable ;
Where OrderID = lcOrderID ;
Union ;
Select "Totals:", Sum(Sum1), Sum(Sum2), Sum(Sum3) From SomeTable ;
Where OrderID = lcOrderID ;
Into Cursor cursorName
>Oops I made a mistake .
>
>I wana show a row containing totals for the rows as the last row of the grid .
>
>Atotal at the bottom of the grid rather than at the right of the columns.
>
>I hope u understand what I am trying to say.
>
>Thanx
Alex