Hi,
I have an old Foxpro program using @ and SAY commands to
get rows to display on the screen for the USER to look
at their customers activity of all Invoices, Credit, and
Payments for the past 2-3 months. This program works very
well in FoxPro 2.6 but I'm now using "Visual FoxPro 9.0".
I don't want to use any @ or SAY commands and want to convert using VISUAL Objects! I've tried using a GRID
but I want "each seperate row" in the grid to insert fields
from two different(.DBF files). DBF (#1=Invoices) and .DBF (#2 = Payments).I already know how to store data into GRID but How do I get each seperate row in GRID to read customer
invoices & payments?? Below is a "portion" of the old ver 2.6 program:
SELECT 1
USE CUSLIST INDEX COMPANY ?? Customer List
SELECT 4
USE ARCHG2 INDEX DATE3,CUSTID6 ?? Invoices & Credits
SELECT 5
USE ARPAID2 INDEX DATE4,CUSTID7 ?? Payments
BAL = A-> HISTORY2
SEEK A->CUSTID
ROW = 5
TOT=A->HISTORY2
DO WHILE A->CUSTID=E->CUSTID .OR. A->CUSTID=D->CUSTID
SELECT 5
IF DATE<= D->DATE .AND. A->CUSTID=CUSTID
ROW=ROW+1
TOT = TOT - PAYMENT
@ROW,1 SAY DATE
@ROW,14 SAY COMMENT
@ROW,49 SAY PAYMENT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ELSE
SELECT 4
IF A->CUSTID=CUSTID
ROW = ROW+1
TOT = INVTOT + TOT
@ROW,1 SAY DATE
@ROW,14 SAY TERMS
@ROW,36 SAY INVNUM
@ROW,49 SAY INVTOT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ENDIF
ENDIF
SELECT 4
IF DATE <= E->DATE .AND. A->CUSTID=CUSTID
ROW = ROW+1
TOT = INVTOT + TOT
@ROW,1 SAY DATE
@ROW,14 SAY TERMS
@ROW,36 SAY INVNUM
@ROW,49 SAY INVTOT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ELSE
SELECT 5
IF A->CUSTID=CUSTID
ROW=ROW+1
TOT = TOT - PAYMENT
@ROW,1 SAY DATE
@ROW,14 SAY COMMENT
@ROW,49 SAY PAYMENT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ENDIF
ENDIF
ENDDO
If a GRID isn't the way to go on this-then what should I do?? Any help would be greatly appreciated !
Greg
I have an old Foxpro program using @ and SAY commands to
get rows to display on the screen for the USER to look
at their customers activity of all Invoices, Credit, and
Payments for the past 2-3 months. This program works very
well in FoxPro 2.6 but I'm now using "Visual FoxPro 9.0".
I don't want to use any @ or SAY commands and want to convert using VISUAL Objects! I've tried using a GRID
but I want "each seperate row" in the grid to insert fields
from two different(.DBF files). DBF (#1=Invoices) and .DBF (#2 = Payments).I already know how to store data into GRID but How do I get each seperate row in GRID to read customer
invoices & payments?? Below is a "portion" of the old ver 2.6 program:
SELECT 1
USE CUSLIST INDEX COMPANY ?? Customer List
SELECT 4
USE ARCHG2 INDEX DATE3,CUSTID6 ?? Invoices & Credits
SELECT 5
USE ARPAID2 INDEX DATE4,CUSTID7 ?? Payments
BAL = A-> HISTORY2
SEEK A->CUSTID
ROW = 5
TOT=A->HISTORY2
DO WHILE A->CUSTID=E->CUSTID .OR. A->CUSTID=D->CUSTID
SELECT 5
IF DATE<= D->DATE .AND. A->CUSTID=CUSTID
ROW=ROW+1
TOT = TOT - PAYMENT
@ROW,1 SAY DATE
@ROW,14 SAY COMMENT
@ROW,49 SAY PAYMENT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ELSE
SELECT 4
IF A->CUSTID=CUSTID
ROW = ROW+1
TOT = INVTOT + TOT
@ROW,1 SAY DATE
@ROW,14 SAY TERMS
@ROW,36 SAY INVNUM
@ROW,49 SAY INVTOT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ENDIF
ENDIF
SELECT 4
IF DATE <= E->DATE .AND. A->CUSTID=CUSTID
ROW = ROW+1
TOT = INVTOT + TOT
@ROW,1 SAY DATE
@ROW,14 SAY TERMS
@ROW,36 SAY INVNUM
@ROW,49 SAY INVTOT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ELSE
SELECT 5
IF A->CUSTID=CUSTID
ROW=ROW+1
TOT = TOT - PAYMENT
@ROW,1 SAY DATE
@ROW,14 SAY COMMENT
@ROW,49 SAY PAYMENT
@ROW,61 SAY TOT PICTURE "999999.99"
SKIP
ENDIF
ENDIF
ENDDO
If a GRID isn't the way to go on this-then what should I do?? Any help would be greatly appreciated !
Greg