Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REPORT FORM using prompt
Message
 
 
À
02/11/2006 00:48:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01166501
Message ID:
01166639
Vues:
15

>>
Other Microsoft functions (Word, Outlook etc) seem to remember the last printer chosen, and we are trying to emulate that in VFP without much luck
<<


You can emulate this somewhat easier in Sedna using PrintCachedPages (see below). But the best way to do it is to output to your own printer handle rather than to Fox's.

>L<
PUBLIC ReportDefault  && app attribute or reportlistener attribute
ox = CREATEOBJECT("reportlistener")
ox.ListenerType = 3
IF .T. && if my app wants PROMPT
   LOCAL lcVFPReport
   lcVFPReport = SET("PRINT",3)
   IF EMPTY(ReportDefault)
      SET PRINTER TO NAME (GETPRINTER())
      ReportDefault = SET("PRINT",3)
   ELSE
      SET PRINTER TO NAME (ReportDefault)
   ENDIF   
ENDIF   
REPORT FORM ? OBJECT ox  
ox.PrintCachedPages()
SET PRINTER TO NAME (lcVFPReport)
? SET("PRINT",3)
* default VFP printer is the same,
* which you seem to want,
* but you still have your ReportDefault information,
* for use next time... 
? ReportDefault

RETURN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform