You could do something like the following:
LOCAL;
lcFBegBal,;
ldStrtDte
ldStrtDte = {03/01/98}
SELECT;
Acct_No ,;
[Opn Bal] AS [Dscr] ,;
ldStrtDte - 1 AS [TranDte],;
SUM(TranAmt) AS [TranAmt] ;
FROM Ledger;
WHERE TranDte < ldStrtDte;
INTO CURSOR t_BegBal
SELECT;
FROM t_BegBal;
UNION;
SELECT;
Acct_No ,;
[Trans ] AS [Dscr] ,;
TranDte AS [TranDte],;
TranAmt AS [TranAmt] ;
FROM Ledger;
WHERE TranDte >= ldStrtDte;
ORDER BY 1, 2, 3;
INTO TABLE t_Rpt
-myron kirby-
==========================================
>I am developing an accounting application in VFP5 (re-writing from 2.6 where every report I produced I coded by hand, the long way) and I am having trouble figuring out how to show opening balances on a single line for each account (total of all transactions before the chosen period). Is this something I have to collapse into a single detail line in a prepare-the-data routine before I invoke the report or is there a way in the report itself to collapse several but not all detail lines.
>
>Any help, even a general direction in which to go, would be greatly appreciated.
>
>Reg