Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6:Printing in XP across a network
Message
De
10/10/2002 09:19:30
 
 
À
10/10/2002 05:35:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00709739
Message ID:
00709787
Vues:
16
>(Not really a reports question but its the closest I could find...)
>
>
>To print to various _specific_ printers across a network, up until now I've
>been using APRINTERS( ) to give me a list of valid printer names for the
>user to chose from.
>
>Then for the various reports I have something like...
>
>cPrinter = myprint1
>set printer to name &myprint1
>...(report)
>
>cPrinter = myprint2
>set printer to name &myprint2
>...(report)
>
> etc..
>
>
>The problem is that Aprinters( ) _used_ to return the actual printer
>name -such as "HP DESKJET" or "Epson Stylus 640", but in XP Aprinters( )
>returns eg. "HP DESKJET on (servername)".
>
>So the Set Printer To name (printername) no longer works in XP.

Actually, it works, just use the first column, the printer name rather than the second columnm, specifying the device (by UNC if they're network printers, or by printer name for locald devices. the following is the output from VFP7 for the array in my XP station:
AA                                                  Pub                            A            
   (    1,    1)  C            "Symantec Fax Starter Edition"
   (    1,    2)  C            "OLFModem"   
   (    2,    1)  C            "\\WEATHERSVR\\\MARTYQ\marty"       
   (    2,    2)  C            "\\MARTYQ\marty"  
   (    3,    1)  C            "\\WEATHERSVR\\\OUTER\eileen"     
   (    3,    2)  C            "\\OUTER\eileen" 
   (    4,    1)  C            "\\weathersvr\laserplain"
   (    4,    2)  C             "IP_192.168.0.40,IP_192.168.0.41" 
>Can anyone tell me the way I should/could be doing this? ...and also if this will work in a MS 'cross-platform' network.

You have to use the form SET PRINTER TO NAME (myprint2) rather than macro-expanding the vairable.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform