Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing print job left open by NOPAGEEJECT
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01086324
Message ID:
01086456
Vues:
24
I found a solution that seems to working for me:
loObj = CREATEOBJECT("reportlistener")
loObj.listenertype = 0 && to printer
FOR ln = 1 TO Whatever
  REPORT FORM MyReport OBJECT loObj NOPAGEEJECT
ENDFOR
loObj = null && the printer job gets closed here
This doesn't work if listenertype is 1 (the preview doesn't show up on the last line), but this can easily be workarounded by setting the listener type to 3 and setup up the previewer manually.

>Thanks a lot for the suggestion. I did try to append an empty report, too, but that didn't seem to work right:
>
>- when previewing, it didn't start the previewer - as if the previwer startup was suppressed by the last report being empty. This can be fixed by setting up the previwer manually
>
>- when sending the output to a printer the last report added an empty page at the end of the print job and I couldn't figure out how the get rid of it
>
>>The easiest trick is this ....
>>
>>
>>FOR ln = 1 TO Whatever
>>  REPORT FORM MyReport PREVIEW NOPAGEEJECT
>>ENDFOR
>>REPORT FORM MyReport Next 0 PREVIEW
>>
>>
>>Telling it to do the report with the next 0 records is enough to fake it out so it ends the print job.
Martin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform