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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing an array

Status
Not open for further replies.

fishman13

Programmer
Jul 8, 2002
73
0
0
US
We have an old application that process information and writes the results to a two dimensial array set to 80 x 66. This array was then sent to a printer. Is there a way this can still be done in VFP or do we have to make a report.
 
It depends on what type of output you are looking for.

You can try this:

lnROws = ALEN('myArray',1)
lnCols = ALNE('myArray',2)

lcDevice = SET('device')
SET DEVICE TO printer
FOR lni = 1 to lnRows
FOR lnj = 1 to lnCols
? myArray(lni,lnj)
ENDFOR
ENDFOR

EJECT && clear printer buffer and force last page out

SET DEVICE TO &lcDevice

* I am not sure if the "EJECT" command is required. That may depend on the way you are setup.


Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top