Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing Report output sent to a file
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00489937
Message ID:
00490403
Views:
7
Along these same lines...

I have been doing battle with the WinAPI CopyFile() function. It is nice to send a previously printed report to a printer at a specific time/date etc without the flash of the DOS box that you get with the DOS copy command. However.. I can't get the function to accept any destination other than 'LPT1:'.

No problems declaring the function as directed in the download section. Then I try:

CopyFile('c:\mydir\myfile.txt','LPT1:',0) and all is well.

If I try:

CopyFile('c:\mydir\myfile.txt','PRN:',0) the function returns a value of 2 - but no printing occurs

My preference woudl be to set the printer with
SET PRINTER TO NAME mypriter
and then call CopyFile with the PRN: function.

Any hints would be appreciated. Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform