Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating a report to a file
Message
De
29/11/2007 16:29:48
 
 
À
29/11/2007 15:14:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01272197
Message ID:
01272223
Vues:
22
>I have a routine which prints a report to a pdf file (using PDFfactory). After the REPORT FORM clause has been initiated my code continues to run - BUT the subsequent lines of code are dependent upon the PDF having been generated. Sometimes the pdf generation takes several seconds and the subsequent code breaks. I have tried putting in a LOOP statement to check for the PDF file being generated, but this does not seem to work consistently - sometimes just getting stuck in the loop because (I assume) the loop is taking all the processing time and the pdf cannot be completed.

- you could use INKEY( nSeconds ) to wait a certain amount of time, then check for file existence. You could put this in a loop

- another way is the Sleep API in Windows: http://news2news.com/vfp/?group=58&function=80

- an alternative would be to use a Timer object, again checking periodically for the file
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform