Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summarizing Opening Account Balances in a Report
Message
From
27/05/1998 21:32:58
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00102573
Message ID:
00102585
Views:
26
You could do something like the following:
LOCAL;
  lcFBegBal,;
  ldStrtDte 
  
ldStrtDte = {03/01/98}

*--Create opening balances
SELECT;
    Acct_No               ,;
    [Opn Bal]            AS [Dscr]   ,;
    ldStrtDte - 1        AS [TranDte],;
    SUM(TranAmt) AS [TranAmt] ;
  FROM Ledger;
  WHERE TranDte < ldStrtDte;
  INTO CURSOR t_BegBal

*--Create reporting file
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
----------------------------------
-myron kirby (mkirby2000@gmail.com)-
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform