Hello,
Using VFP 6.0.I have some code to run through some files and make some changes to data for conversion. I would like to print the fields of the records I am changing. I can not figure our how to make it print. I need the code to print the records I have touched. Currently just get a blank page.
*******************
Close Data
Select 1
use c:\dir\table1.dbf shared in A
select 2
use c:\dir\table2.dbf shared IN B
select 1
use c:\dir\table1 .dbf shared in A
Select 2
use c:\dir\table2.dbf shared in B
index on alltrim(upper(table2.title)) to test
go top
Do while ! eof()
str_Title = alltrim(upper(table1.Old_title))
Select 2
seek str_Title
IF FOUND()
replace table2.Title with alltrim(upper(table1.new_title))
ENDIF
SELECT 1
SKIP
ENDDO
Select 2
index on alltrim(upper(table2.title)) to test2
go top
Do while .not. eof()
replace title with "" for title = "DELETE"
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on mainphone to test3
Do while not eof()
replace mainphone with "" for mainphone = "( ) - "
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on faxnum to test4
Do while not eof()
replace faxnum with "" for faxnum = "( ) - "
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on alltrim(pnum) + alltrim(gnum) to test4
go top
Select 4
use c:\dir\table4.dbf shared in D
index on alltrim(pnum) + alltrim(gnum) to test5
Do while ! eof()
str_PRid = alltrim(table4.pnum) + alltrim(table4.gnum)
Select 3
seek str_PRid
If Found()
If (table3.expdate) = {} .or. null .and. alltrim(table3.reason) = "V"
Crdate = alltrim(table4.updatedby)
replace table3.expdate with ctod(right(crdate,8))
set console off
set printer on
set device to printer
if prow() > 55
eject
prow() = 1
@prow(), col() + 12 say "PNUM"
@prow(), col() + 33 say "GNUM"
@prow(), col() + 53 say "REASON"
@prow(), col() + 73 say "EXPDATE"
@prow(), col() + 93 say "EXPDATE"
endif
prow() = prow() + 1
@prow(), col() + 12 say table3.pnum
@prow(), col() + 33 say table3.gnum
@prow(), col() + 53 say table4.reason
@prow(), col() + 73 say table3.expdate
else
If table3.expdate = {}
replace table3.expdate with ctod("12/31/2099")
Endif
Endif
Endif
Select 4
Skip
Enddo
set console off
set printer on
set device to printer
set printer to
Using VFP 6.0.I have some code to run through some files and make some changes to data for conversion. I would like to print the fields of the records I am changing. I can not figure our how to make it print. I need the code to print the records I have touched. Currently just get a blank page.
*******************
Close Data
Select 1
use c:\dir\table1.dbf shared in A
select 2
use c:\dir\table2.dbf shared IN B
select 1
use c:\dir\table1 .dbf shared in A
Select 2
use c:\dir\table2.dbf shared in B
index on alltrim(upper(table2.title)) to test
go top
Do while ! eof()
str_Title = alltrim(upper(table1.Old_title))
Select 2
seek str_Title
IF FOUND()
replace table2.Title with alltrim(upper(table1.new_title))
ENDIF
SELECT 1
SKIP
ENDDO
Select 2
index on alltrim(upper(table2.title)) to test2
go top
Do while .not. eof()
replace title with "" for title = "DELETE"
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on mainphone to test3
Do while not eof()
replace mainphone with "" for mainphone = "( ) - "
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on faxnum to test4
Do while not eof()
replace faxnum with "" for faxnum = "( ) - "
ENDDO
Select 3
Use c:\dir\table3.dbf shared in C
index on alltrim(pnum) + alltrim(gnum) to test4
go top
Select 4
use c:\dir\table4.dbf shared in D
index on alltrim(pnum) + alltrim(gnum) to test5
Do while ! eof()
str_PRid = alltrim(table4.pnum) + alltrim(table4.gnum)
Select 3
seek str_PRid
If Found()
If (table3.expdate) = {} .or. null .and. alltrim(table3.reason) = "V"
Crdate = alltrim(table4.updatedby)
replace table3.expdate with ctod(right(crdate,8))
set console off
set printer on
set device to printer
if prow() > 55
eject
prow() = 1
@prow(), col() + 12 say "PNUM"
@prow(), col() + 33 say "GNUM"
@prow(), col() + 53 say "REASON"
@prow(), col() + 73 say "EXPDATE"
@prow(), col() + 93 say "EXPDATE"
endif
prow() = prow() + 1
@prow(), col() + 12 say table3.pnum
@prow(), col() + 33 say table3.gnum
@prow(), col() + 53 say table4.reason
@prow(), col() + 73 say table3.expdate
else
If table3.expdate = {}
replace table3.expdate with ctod("12/31/2099")
Endif
Endif
Endif
Select 4
Skip
Enddo
set console off
set printer on
set device to printer
set printer to