Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report printed status

trial03

Technical User
Oct 9, 2011
10
MY
Dear all,

how could tell whether the report was actually printed when issue command like below :

REPORT FORM report1 TO PRINTER PROMPT PREVIEW


thanks and regards,
 
Which version of VFP are you using. If it's the usual VFP9, you can make use of the reportlistener "OnPreviewClose" method. The help on that has good example code.
 
Just watch out, in REPORTBEHAVIOR 90, SYS(2040) does not become "2".

I double checked that in VFP9 9.0.0.7423. I think it's be design, as VFP 9 report behavior is using a pagecage that exactly prints what preview showed and thus does not do a separate pass for actual printing. You might be able to configure this to force a separate pass, especially when you depend on it in expressions that you actually want to only be added when finally printing and not in preview. Anyway, it's an annoyance.
 
Last edited:
Hello,

I do not know an answer, too. Sys(2040) seems not always work as expected.

We have 2 buttons in our software :
"Preview " = Preview report without invoice number or with a watermark
"Print and save" = With invoicenumber and printout or generate PDF and save data

You may also try foxypreviewer, AFAIK you can programmatically hide the print (and other) buttons
 
The solution that always works is a reportlisteners OnPreviewClose method and SYS(2040) works with SET REPORTBEHAVIOR 80 or in older VFP versions (up to 8). So there's a solution to any case.
 

Part and Inventory Search

Sponsor

Back
Top