Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing multiple reports
Message
 
 
À
01/10/2009 00:26:08
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01426232
Message ID:
01427744
Vues:
153
Once we get a printer name from the Prompt dialog, do we just use SET PRINTER TO NAME (lcPrinterName) or there is a way to set Listener's properties instead (for number of copies, for example)?

I don't see it in CommandClauses or Listener's properties.

Thanks in advance.

BTW, this is the code as I have it now (commented parts were for showing two Preview Dialogs):
LOCAL loListener as adilistener_directives of w:\foxcommon\classes\Adi\ADIListener.VCX, llContinue, loPreview
LOCAL loPromptDlg as ioPrinterDialog OF ioPrinterPromptDialog
DO (_REPORTPREVIEW) WITH loPreview
loListener = NEWOBJECT('ADIListener_Directives','ADIListener.vcx')

loListener.LISTENERTYPE = 0
loListener.lPrinterPrompt = .T.

llContinue = .T.
llContinue = llContinue AND InvoiceReport(cInvoices.nInvoiceID, .F., .T., loListener, 'NOPAGEEJECT')
llContinue = llContinue AND LaborReport(cInvoices.nJobID, loListener)

loPromptDlg = NEWOBJECT("ioPrinterDialog", "ioPrinterPromptDialog.prg")
loPromptDlg.RunPromptDialog()
IF loPromptDlg.Action <> "CANCEL"
  loListener.CommandClauses.  loPromptDlg.PRINTERNAME
?loDlg.Copies
?loDlg.Action

*!*	ASSERT .f. MESSAGE 'Preparing to show our Preview form 1'
*!*	IF m.llContinue AND loListener.OUTPUTPAGECOUNT >= 1 AND loListener.PageTotal > 0
*!*		loPreview.SetReport(loListener)
*!*		loPreview.SHOW(1)
*!*	ENDIF

*!*	llContinue = llContinue and not loListener.lIsCanceled

** Need to print these reports as two jobs because first two are portrait and these two are landscape
llContinue = llContinue AND PartsAndSubletReport(cInvoices.nJobID, .T., loListener, 'NOPAGEEJECT')
llContinue = llContinue AND PartsAndSubletReport(cInvoices.nJobID, .F., loListener, '')

*ASSERT .f. MESSAGE 'Preparing to show our Preview form 2'
*!*	IF m.llContinue AND loListener.OUTPUTPAGECOUNT >= 1 AND loListener.PageTotal > 0
*!*		loPreview.Caption = "Preview multiple Shop Documents"
*!*		loPreview.SetReport(loListener)
*!*		loPreview.SHOW(1)
*!*	ENDIF
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform