Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the printer for the application
Message
From
24/07/2001 15:34:00
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Setting the printer for the application
Miscellaneous
Thread ID:
00534609
Message ID:
00534609
Views:
53
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
Map
View

Click here to load this message in the networking platform