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

Error when printing to a file

Status
Not open for further replies.

rooship

IS-IT--Management
Jun 25, 2003
20
Hello,
I am getting an error when writing to a file, instead of sending it directly to print.
Initially, when the program runs, I set the printer to a certain file name, using the SET PRINTER command
Later, data is written to this file using @ SAY command. This works fine for the first 2048 lines.
However, at line# 2048, it gives an error message saying 'Invalid Coordinates @ Line# 2048'
I am using Visual Foxpro 6, and I do not get this error while using DOS Foxpro.
Any suggestions why this error occurs?

Thanks for your help,
Rooshi
 
Hi Rooshi,

I am assuming you haven't been using EJECT.

In the setup for the print job set the system variables:
Code:
_PADVANCE = "LINEFEEDS"
_PLENGTH = 66 && 6 LPI * 11" or whatever your page length is
Then you can use EJECT, which will reset PROW().

Regards,

Mike
 
Unless there is a specific reason you need the @ SAY command you may be able to do it with SHELLEXECUTE. Just include the .txt extentsion and "Print" for the 2nd parameter.

Check out the following link

Hyperlink to a file
Thread184-243825

Although this example is for opening a url, it will work for other file types too, and the optional print parameter will send it to print

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

Part and Inventory Search

Sponsor

Back
Top