Information générale
Titre:
Setting the printer for the application
I would like to direct a report (using DataReport) to any printer I choose without using the dialog, without displaying the report on the screen, and without changing the default printer on the PC (many sessions will be running at once). This functionality will be in an ActiveX Exe. I've tried this:
Sub PrntRep(strPrinter as string)
dim x as printer
for each x in printers
if x.DeviceName=strPrinter then
set printer = x
exit for
endif
next
datareport1.PrintReport false
EndSub
However, the print always goes to the default printer of the PC.
Also, I can use the Printer Object (like above) when just sending text to a label printer (Printer.Print) and I can change printers with no problem...
What am I missing?
David Martin
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement