Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer lost pages
Message
 
 
À
15/08/2008 12:13:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01339140
Message ID:
01339164
Vues:
12
Hi Yelena,

Quick suggestion here - instead of DO WHILE() use Windows API Sleep function. BTW, I sent you a PM a second ago.

>We had a similar problem with Zebra printer. We were still developing with VFP8 at the time. In our case that sometimes without user’s interactions some random labels got skipped.
>We experimented with it and found that if print one label at a time with a pause in about 7 seconds in-between the problem went away, but we could not afford to make our user wait that long, so we created a separate exe for the label print we create a cursor with all the labels ready to get printed, converted this cursor into XML file and pass the name of this XML file into the new EXE file calling it using windows shell API. This way the user can proceed with their task while the print task was still printing the labels. I know it is not the most elegant or best of solutions, but it is working. I would be interested if you or anyone else can find a different way to deal with it.
>Here is what the code in the "printing" exe looks like
>
>
>
>=XMLTOCURSOR(lFile,"ZPrintLabel",512)
>SELECT ZPrintLabel
>= AFIELDS(laReport)
>LOCAL lcLabelCursor, lnSec
>lcLabelCursor = SYS(2015)
>CREATE CURSOR (lcLabelCursor) FROM ARRAY laReport
>SELECT ZPrintLabel
>GO TOP
>SCAN
>	SCATTER MEMVAR MEMO
>	SELECT (lcLabelCursor)
>	ZAP
>	APPEND BLANK
>	GATHER MEMVAR MEMO
>	LABEL FORM (lLabelForm) TO PRINTER NOCONSOLE
>	lnSec = SECONDS()
>	DO WHILE SECONDS() < lnSec + 7
>		** the printer need some time
>	ENDDO
>	SELECT ZPrintLabel
>ENDSCAN
>
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