General information
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only