Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing with Alaska

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

Simple text is faster for a dot matrix to print than Windows
fonts, mainly if I have to print more than 200 pages often.
Is it possible to print simple text with Alaska on Windows ?

Thanks

J.A.
 
Hi,

Easy as.

I have migrated several clipper applications to
XBASE++ and am now happily printing reports under
Windows. The following sample should give you the idea...



USE tranfile && my transaction file
SET PRINTER TO LPT1
SET DEVICE TO PRINT
GO TOP
nrow = 100
npage = 0
DO WHILE .NOT. EOF()
IF nrow > 60
// head up a fresh page
npage++ && increment the page number
IF npage > 1
EJECT
ENDIF
? "Date: ",DTOS(date()," Page: "+STR(npage,3)
? " REPORT HEADING"
?
? "CODE DESCRIPTION QUANTITY AMOUNT"
? "-------- -------------------- -------- ---------- nrow=1
ENDIF

// print next transaction
? code,descript,STR(quantity,8,3),STR(amount,10,2)
nrow++ && increment the line count
// next transaction
SKIP
ENDDO
CLOSE ALL
SET DEVICE TO SCREEN
SET PRINTER TO

Hope this helps,
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top