Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Marian Adelin STOICESCU
  Where is Marian Adelin STOICESCU?
 Pitesti jud. Arges tel. 040 721763920
 Romania
 Marian Adelin STOICESCU
 Tags
Subject: VFP Known .. SET PRINTER select problem ???
Thread ID: 22398 Message ID: 22398 # Views: 7 # Ratings: 0
Version: Visual FoxPro 6 Category: Reports and Printers
Date: Thursday, April 17, 2003 8:46:21 AM         
   


i hava an application that runs in a w2k active directory network enviroment and i have more networks printers too..
When i have started to design some froms that intends to prints reports(in 2 ex : one on the local printer and other on a network printer) i think like this:

if APRINTERS(prn_vector) =0 
   *No printers available
   *....
else    
   messagebox(" Please select a NETWORK printer ... ",0,"")   &&only message, the user can actuly select any printer
   prn_network=getprinter()  
   if prn_network="" then 
     **Cancel...
   else 
     set printer to &prn_network
     thisform.visible=.f.
     report form rapoarte\report_test  preview          
     thisform.visible=.t.
   endif

   messagebox(" Please select a LOCAL printer ... ",0,"")   &&only message, the user can actuly select any printer
   prn_local=getprinter()  
   if prn_network="" then 
     **Cancel...
   else 
     set printer to &prn_local
     thisform.visible=.f.
     report form rapoarte\report_test  preview          
     thisform.visible=.t.
   endif

endif


** seems to be logic TRUE ..but don't work that we expect ( i read other net docs i seems is a problem with set printer .. in a network enviroment)
(report are sends to the same printer, sometimes to the local PRN sometimes to network PRN)

-----------------------
now i use
     set printer to getprinte()
     thisform.visible=.f.
     report form rapoarte\report_test  preview          
     thisform.visible=.t.
  

this works .. (send the report to the selected printer)
but you can't detect that user press Cancel button..

ideeas ..? (pls)

Regards.


COMPLETE THREAD

VFP Known .. SET PRINTER select problem ??? Posted by Marian Adelin STOICESCU @ 4/17/2003 8:46:21 AM
RE: VFP Known .. SET PRINTER select problem ??? Posted by Yuri Rubinov @ 4/17/2003 3:25:09 PM