I think there is a way to get selected printer inside the report itself if you're using ReportBehavoir 90. Unfortunately, I forgot the exact details of how this can be done. If I remember correctly, I probably asked that question here about 7 or more years ago and Lutz Scheffier provided some ideas (if memory serves right).
I am not sure how to find that discussion here, though, if it existed.
>Hi!
>
>>
http://www.atoutfox.org/articles.asp?ACTION=FCONSULTER&ID=0000000797>>set classlib to pdialog additive
>> o=createobject("pdialog.pdialog")
>> o.showprinter()
>> ?o.printername
>
>This answer shows how to select printer. VFP standard GETPRINTER() can probably used for this.
>I dont understand why this class is better than using GETPRINTER() as described in
>
>
https://support.microsoft.com/en-us/help/162798/how-to-use-the-set-printer-to-name-command-to-print-to-a-specified-printer-in-visual-foxpro>
>I asked how to get printer where report was printed using PROMPT clause:
>
>
REPORT FORM xxx TO PRINT PROMPT
>
>If this possbible, maybe thereis some sys() function or somethis other or is it possible to get printer name during report print ?
>
>Or should this command re-factored not to use PROMPT clause like:
>
>
cPrinter = getprinter()
>set printer to name (cPrinter)
>REPORT FORM xxx TO PRINT
>insert into logfile (PrinterUsedForPrinting) values (cPrinter)
>
>
>Posted also in
>
>
http://stackoverflow.com/questions/43486693/get-printer-where-report-was-printer
If it's not broken, fix it until it is.
My Blog