Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cash-Book Report in Columnar Format!
Message
 
À
12/07/2004 08:30:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00923259
Message ID:
00923266
Vues:
21
Satya,

Create a cursor as a Hilmar said, & do something like this (not tested)
CREATE CURSOR CashBook (Receipt N(6,2), Payments N(5,2))
SELECT MainTable
GO TOP
SCAN
  IF UPPER(MainTable.Type) == "R"
     INSERT INTO CashBook (Receipt) VALUES (MainTable.Amount)
  ENDIF
ENDSCAN
all_cach_rec = RecCount("CashBook")

SELECT MainTable
GO TOP
new_rec = 0 
SCAN
  IF UPPER(MainTable.Type) == "P"
     new_rec = new_rec + 1
     IF new_rec <= all_cach_rec
        SELECT CashBook
        GOTO new_rec
        REPLACE Payments WITH MainTable.Amount
     ELSE
        INSERT INTO CashBook (Receipt) VALUES (MainTable.Amount)
     ENDIF
  ENDIF
  SELECT MainTable
ENDSCAN

SEELCT CashBook
REPORT .....
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform