You can call the CancelReport method from script code that stops the run of a report if, for example, the user clicks Cancel when the GetValueForField or GetValueForParameter functions are called.
Syntax
CancelReport()
Parameters
None.
Return Value
None.
Example
This code snippet, taken from the user-defined function called from a formula, prompts the user for a date and cancels the report if they click Cancel.
Visual FoxPro
ldValue = GetValueForField('Orders.OrderDate', ;
'is greater')
if isnull(ldValue)
SQApplication.DataEngine.CancelReport()
return
endif
* rest of code
© Stonefield Software Inc., 2024 • Updated: 03/07/18
Comment or report problem with topic