Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing multiple reports
Message
De
06/10/2009 01:06:09
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:
01427849
Vues:
146
This message has been marked as a message which has helped to the initial question of the thread.
Hi Naomi,

I'm a little bit confused with your problem, so lets see if I can put a meaningfull answer.

You like to use some external printer dialog store its settings and use it settings for subsequent reports.

So now you fail to get the settings from the dialog into the listener.


For what I see there is no interface for this. The COMMANDCLAUSES object is to represent the command clauses of the REPORT FORM command, for what I remember there is no number of copies, so there is no place for COMMANDCLAUSES to hold it.

The internal events otoh give no access too.

One might mimic a complex page range if one change listners IncludePageInOutput event.

For multiple copies I see no other way then using an other LISTENERTYPE and control preview and output wth code. I have never done this, but it should be possible.

Agnes

>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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform