Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printers and VFP
Message
From
20/08/1999 19:58:08
 
 
To
19/08/1999 14:39:02
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00255437
Message ID:
00256122
Views:
37
>>>Hi all,
>>> I have some reports that use @ say commands as opposed to the report writer. Some reports just can't be done with the report writer. I'm trying to add a feature to allow users to select which printer to send reports to. Bsically I'm using the Fox function GetPrinterand making API calls to GetProfileString, WriteProfileString, and SendMessage to change the default printer temporarily, then set it back after the report runs. When I change the printer and use sendmessage to notify all apps that the default printer changes IE, Word, etc.. prints to the correct printer.. BUT VFP doesn't seem to notice I changed printers.. Maybe I'm going at this the wrong way.. not sure.. Help!
>>>
>>>TIA!
>>
>>Have you tried:
>>
>>SET PRINTER TO NAME (GETPRINTER())
>
>Yes.. If yuo pick anything other than the default printer it does nothing.. if you pick the default.. it prints fine..

PMFJI: We use @SAY to print checks, and SET PRINTER TO NAME ("&xxx.") to re-direct the printer, and its fine. Don't want to insult you, but are you also doing "SET DEVICE TO PRINT" before and "SET DEVICE TO SCREEN" after? Also, try doing this: xxx = GETPRINTER() then SET PRINTER TO NAME ("&xxx.") - just like this -- macro in quotes and parentheses might do the trick for you.

Beware: GetPrinter() gets the printer by NAME as shown in the Print Manager window -- and is different for different users if they decided to 'rename' their printer icons to 'be more logical' or some such...

HTH

Rob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform