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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get return value for 'Cancel' or 'Print' on Print dialog?

Status
Not open for further replies.

diem

Programmer
Jul 25, 2001
28
0
0
US
Hi,

If I issue a command that asks users to print a report:
report form "XXX.frx" to printer prompt
how do I get the return value if the user click "Print" or "Cancel"?
My problem is that I have to go through the whole table and do a report for each record. But I need to prompt the user to select the printer once and then print the rest of records without prompting again. Is it possible to get the return value if users click 'Cancel' button? Any idea would help a lot. Thanks
 
Try this:

Code:
STORE '' TO p_name
p_name = GETPRINTER()
IF LEN(ALLTRIM(p_name)) > 0   &&... user clicked 'Ok'
   SET PRINTER TO (p_name)
   REPORT FORM blahblah TO PRINT 
ELSE
   &&... user clicked 'Cancel'
   &&...   do whatever
ENDIF
Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top