heres now the part of the source code you may want to see
#DEFINE COND_ON SendCodes(Chr(15))
#DEFINE COND_OFF SendCodes(Chr(18))
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function EmpHis
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local prevhandler
Local sysTitle, rptTitle, rptCond, rpt,Id, colhead, colhead2
Local pageLen, pageWidth, Tmargin, Bmargin, Lmargin, Rmargin
Local PageNo := 0
Select 1
Use MASTER
If !File("Mastrntx.ntx"

Inde on EmpNo to Mastrntx
Else
Set Inde to Mastrntx
Reindex
Endif
Select 2
Use Trans
If !File("TRANSNTX.NTX"

Inde on TEmpNo to TRANSNTX
Else
Set Inde to TRANSNTX
Reindex
Endif
goto top
HisFlag := .T.
Do While HisFlag
Set Colo to
@ 02,00 clea to 24,79
SysTitle := "PLEBEIAN Academy - Account History"
rptTitle := "Employee History"
rptCond := "(All Employee History)"
rptId := "EmpHis"
colhead2 := "------------------------------------------------------------------------"
colhead := "Salary Date Gross Pay Deduction Net Pay"
colhead3 := "------------------------------------------------------------------------"
pageLen := 65
pageWidth:= 80
Tmargin := 03 //04
Bmargin := 03
Lmargin := 05 //08
Rmargin := 05 //02
GTG := GTD := GTN := 0
PrevHandler := errorBlock()
errorBlock( { |error| PrnErr(10, 05, error, prevhandler) } )
xEmpno := 0
Set Relation to TempNo into MASTER
Save Screen to Temp
Set Colo to
Set Curs On
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
set Colo to "GR+/b"
@ 03, 05 clear to 05,45
@ 03, 05 to 05,45 doub
set Colo to
@ 04,07 say "Enter Employee Number:" colo "gr+/b"
@ 04,30 Get xEmpno Pict "@r 9999-9999" colo "bg+/b"
Read
Set Curs Off
If !PrintReady(10,05)
Return nil
Endif
Loca for xEmpno = TempNo
If !Found()
TxtBox("Sorry No Such Employee Number Exist...",12)
return
Else
Set Filter to xEmpno
sort on Tdate
Endif
Ngalan := Alltrim(Master -> EmpLname)+", "+Alltrim(Master ->EmpFname)
Numero := xEmpNo
set device to Printer
setprc(00,00)
Sele 2
Set colo to
Begin Sequence
* Do While !Master-> (eof())
Do While !Trans -> (eof())
If CheckAbort(10,05)
Break
Endif
If PageEject(pageLen, Tmargin, Bmargin)
PageNo++
PageHead(sysTitle, rptTitle, rptId, pageWidth, Lmargin, Rmargin, PageNo)
NextRow(02, Lmargin, ColHead2 )
NextRow(01, Lmargin, colhead )
NextRow(01, Lmargin, colhead3 )
Endif
NextRow(01, Lmargin, Dtoc(TDate))
SameRow(20, TGpay, "999,999,999.99"

SameRow(38, Tded, "999,999,999.99"

SameRow(59, TNpay, "999,999,999.99"

GTG := GTG + Tgpay
GTD := GTD + TDed
GTN := GTN + TNpay
Master -> (DbSkip())
Enddo
COND_ON
NextRow(02,Lmargin+13,GTG,"9,999,999,999.99"

SameRow(36,GTD,"9,999,999,999.99"

SameRow(57,GTN,"9,999,999,999.99"
NextRow(01, Lmargin,"History of.."

NextRow(01, Lmargin, Numero,"9999-9999"

NextRow(01, Lmargin, Ngalan)
COND_OFF
eject
End Sequence
errorblock(prevhandler)
set device to screen
@ 02,00 clea to 24,79
Close databases
HisFlag := .F.
Enddo
return nil
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function EmpList
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local prevhandler
Local sysTitle, rptTitle, rptCond, rpt,Id, colhead, colhead2
Local pageLen, pageWidth, Tmargin, Bmargin, Lmargin, Rmargin
Local PageNo := 0
If !PrintReady(10,05)
Return nil
Endif
SysTitle := "PLEBEIAN Academy"
rptTitle := "Company Employee List"
rptCond := "(All Employee History)"
rptId := "EmpList"
colhead2 := "------------------------------------------------------------------------"
colhead := "Employee Number Employee Name Basic Salary Phone #"
colhead3 := "------------------------------------------------------------------------"
pageLen := 65
pageWidth:= 80
Tmargin := 03 //04
Bmargin := 03
Lmargin := 05 //08
Rmargin := 05 //02
PrevHandler := errorBlock()
errorBlock( { |error| PrnErr(10, 05, error, prevhandler) } )
Select 1
Use MASTER
If !File("Mastrntx.ntx"

Inde on EmpNo to Mastrntx
Else
Set Inde to Mastrntx
Reindex
Endif
@ 02,00 clea to 24,79
Goto Top
Set Devi to Printer
setprc(00,80)
Begin Sequence
Do While !Master-> (eof())
If CheckAbort(10,05)
Break
Endif
If PageEject(pageLen, Tmargin, Bmargin)
PageNo++
PageHead(sysTitle, rptTitle, rptId, pageWidth, Lmargin, Rmargin, PageNo)
NextRow(02, Lmargin, ColHead2 )
NextRow(01, Lmargin, colhead )
NextRow(01, Lmargin, colhead3 )
Endif
NextRow(01, Lmargin, EmpNo)
SameRow(20, EmpName)
SameRow(38, EmpBSalary)
SameRow(59, EmpPhone)
master -> (DBskip())
Enddo
COND_ON
NextRow(01, Lmargin,"End Of Employee List Report..."

COND_OFF
eject
End Sequence
errorblock(prevhandler)
set device to screen
@ 02,00 clea to 24,79
Close databases
HisFlag := .F.
return nil
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function CheckAbort(r, c)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local abort := .F.
If Inkey() <> 0
set device to screen
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
Set Colo to
Set Colo to "gr+/b"
@ r-1, c-1 Clear to r+3, 57
@ r-1, c-1 to r+3, 57 Doub
@ r, c say "Printing Interrupted, Paused...."
@ r+1, c say "Do you want to abort Printing? [ Y/N ]"
Abort := (chr(inkey(0)) $ "Yy"

@ 02,00 clea to 24,79
If !Abort
Set Device to Printer
Endif
Endif
Return Abort
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function PrintReady(r, c)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local ready := .F.
Set Device to Screen
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
Set Colo to
Set Colo to "gr+/b"
@ r-1, c-1 Clear to r+3, 57
@ r-1, c-1 to r+3, 57 Doub
If !IsPrinter()
@ r, c say "Printer isn't responding!"
@ r+1, c say "Check that the printer is turned on and is online"
@ r+2, c say "Press any key to abandon report..."
Endif
Do While !(isprinter() .or. Inkey() <> 0)
Enddo
@ 02,00 clea to 24,79
If IsPrinter()
Set Devi to scree
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
Set Colo to
Set Colo to "gr+/b"
@ r-1, c-1 Clear to r+4, 52
@ r-1, c-1 to r+4, 52 Doub
@ r, c say "Ready to Print....."
@ r+1, c say "Do you want to PRINT the reports now?"
@ r+2, c say "Press 'Y' to PRINT or any key to abandon it.."
Ready := (chr(inkey(0)) $ "Yy"

@ 02,00 clea to 24,79
Endif
Return Ready
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function NextRow(howmany, leftmar, what, xPict)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
If what == nil
what := " "
Endif
If xpict == nil
@ prow()+ howmany, Leftmar say what
Else
@ prow()+ howmany, Leftmar say what Picture(xPict)
Endif
Return nil
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function SameRow(colsover, what, xpict)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
If what == nil
what := " "
Endif
If xpict == nil
@ Prow(), colsover say what
Else
@ Prow(), colsover say what picture(xPict)
Endif
Return nil
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function PageHead(sys, rpt, id, width, xleft, xright, page)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local a := dtoc(Date())+" "+id
Local b := time()+" Page : "+ltrim(str(page))
@ prow()+1, xLeft say sys
@ prow(), 60 say a //(width-Len(b)+xright)
@ prow()+1, xLeft say rpt
@ prow(), 60 say b //(width-Len(b)+xright)
Return nil
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function PageEject(length, taas, baba)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local needEject := ((Prow() + baba) > length) .or. (Prow() == 0)
If needEject
If Prow() > 0
Eject
SetPrc(00,00)
Endif
@ Prow()+taas, 00 say " "
Endif
Return needEject
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function SendCodes(string)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local r := prow(), c := pcol()
@ r,c say string
setprc(r,c)
Return " "
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Function PrnErr(r, c, err, PassAlong)
/* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ */
Local TryPa
If Err:GenCode == EG_PRINT
Set Devi to scree
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
Set Colo to
Set Colo to "gr+/b"
@ r-1, c-1 Clear to r+4, 60
@ r-1, c-1 to r+4, 60 Doub
@ r,c say "Printer Error!"
@ r+1,c say "Possible Problems: Out of Paper, Jammed, Off-Line"
@ r+2,c say "Attempt to fix problem, Press any key to Continue"
KeyBoard ""
Do While !(IsPrinter() .or. inkey() > 0)
Enddo
@ 02,00 clea to 24,79
If IsPrinter()
Set Devi to scree
Set Colo to
@ 02,00 clear to 25,80
Set colo to "b+"
nRow := 03
@ 02,01 say "Ú¿"
Do While nRow <> 24
Set colo to "b+"
@nRow,01 say "ÃÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´"
nRow++
Enddo
@ 24,01 say "ÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ"
Set Colo to
Set Colo to "gr+/b"
@ r-1, c-1 Clear to r+4, 60
@ r-1, c-1 to r+4, 60 Doub
@ r,c say "Printer is back..."
@ r+1,c say "Do you want to resume printing the report(s)?"
@ r+2,c say "Press 'Y' to continue or any key to cancel"
Keyboard " "
tryPa := (Chr(Inkey(0)) $ "Yy"

@ 02,00 clea to 24,79
If TryPa
set device to Printer //screen
return .T.
Endif
Endif
Break
Else
return eval(PassAlong, err)
Endif
Return nil