Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Result from Report Form Printer Prompt
Message
From
17/11/2011 14:19:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Miscellaneous
Thread ID:
01470972
Message ID:
01529147
Views:
49
>>>>Hi all,
>>>>
>>>>Is it possible to find out which printer a user selects when the command "Report Form... To Printer Prompt" is run?
>>>>
>>>>Users have access to a PDF printer. If they print the report there, a couple of extra reports are not needed. However, I am wondering if there is a way I can tell that they chose the PDF printer from the Windows dialogue.
>>>>
>>>>Thanks for any help!
>>>>
>>>>Joel
>>>
>>>You could use APRINTER
>>>
>>>
>>>lnCount = APRINTERS(laPrinters)
>>>
>>>and then poplate the list into a listbox, have the user select their printer to a variable
>>>
>>>or use
>>>
>>>lcSelectedPrinter = GETPRINTER()
>>>
>>>
>>>and then print the report.
>>>
>>>
>>>SET PRINTER TO (lcSelectedPrinter)
>>>REPORT FORM <myform> TO PRINT NODIALOG
>>>
>>>
>>>with this you will know which printer the user selected and perform neccessary processing.
>>
>>Thanks for the help! That looks really promising!
>
>Is it the solution you implemented?
>
>I need to print labels. I want to run report form ... to printer prompt the first time and for the rest of the labels use the selected printer.
>
>What is the simplest way to implement this functionality? I believe our application uses reportbehavior 80.


That should work (never tested though :o)))
Instead of
SET PRINTER TO (lcSelectedPrinter)
use
SET PRINTER TO NAME (lcSelectedPrinter)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform