CANCELENABLE in DCPRINT
Posted: Tue Mar 16, 2010 11:33 am
When preparing a long report for preview or print, what is the way to enable an exit button?
The documentation says that CANCELENABLE adds a dialog window during printing with a Cancel button. I don't get a dialog window other than the one from BusyMessage. Can CancelEnable and BusyMessage be used together?
The "x" in the upper right corner of the "BusyMessage" does not cancel the preparation of the report. The stripped down code is below.
Can someone please show me what I'm doing wrong? Is there a method of doing this
similar to DC_Working? Thanks in advance.
DCPRINT ON ;
PREVIEW ;
BUSYMESSAGE "Preparing Report" ;
CANCELENABLE
lOkToPrint := .T.
FOR i:=1 TO LEN(aLines)
lOkToPrint := DC_PRINTEROK()
IF !lOkToPrint
EXIT
ENDIF
@ nRow,nCol DCPRINT SAY aLines
nRow++
NEXT
DCPRINT OFF
The documentation says that CANCELENABLE adds a dialog window during printing with a Cancel button. I don't get a dialog window other than the one from BusyMessage. Can CancelEnable and BusyMessage be used together?
The "x" in the upper right corner of the "BusyMessage" does not cancel the preparation of the report. The stripped down code is below.
Can someone please show me what I'm doing wrong? Is there a method of doing this
similar to DC_Working? Thanks in advance.
DCPRINT ON ;
PREVIEW ;
BUSYMESSAGE "Preparing Report" ;
CANCELENABLE
lOkToPrint := .T.
FOR i:=1 TO LEN(aLines)
lOkToPrint := DC_PRINTEROK()
IF !lOkToPrint
EXIT
ENDIF
@ nRow,nCol DCPRINT SAY aLines
nRow++
NEXT
DCPRINT OFF