Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting the printer for the application
Message
De
24/07/2001 15:34:00
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Setting the printer for the application
Divers
Thread ID:
00534609
Message ID:
00534609
Vues:
52
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
Fil
Voir

Click here to load this message in the networking platform