Use this command to terminate an active report immediately. This command is useful if a report is looping or has been started accidentally. You can terminate inquiry reports without affecting the remainder of the application.
If the report contains Sleep logic statements, transactions prior to the last Sleep logic statement are committed to the application database. |
It is preferable for the report to detect error conditions and terminate itself normally, if possible.
Administration command
:TER report [process] [stoptype] :TER report-name [PID] [stoptype] :TER session-number [stoptype]
Session number can be derived using the :REP command.
Where:
report is the name of the report.
process is the process ID of the report.
The process can only be omitted when the command is entered using the user account that initiated the report. In this case, only active reports or reports awaiting normal recovery (not extended recovery) are terminated.
stopType determines how any transaction in progress is handled.
Use one of the following values for stopType, depending on how you want to terminate the report:
NO.RECOVERY (or NOR) — use if the report is not to be rerun. Any recovery information saved for the report is deleted, unless extended recovery is in use. This is the default type.
DISCARD — use if the report is not to be rerun. Any recovery information saved for the report is deleted.
RECOVER (or NO.DISCARD ) — use to rerun the report, attempting to recover up to and including any transaction it might have been processing when the :TER command was entered.
Two attempts are made to recover the report. If these both fail, a message is sent to the error log and no further attempts are made.
COM+ method
StopReport(VARIANT vtReport, StopReportFlags)
Where:
vtReport is the name of the report.
Flags determines how any transaction in progress is handled.
In the COM+ method Flags is a numeric value of 1 through 4, depending on how you want to terminate the report:
1 — stops the report at the next critical point. Refer to Stopping a Report for more information.
2 — does not rerun the report. Any recovery information saved for the report is deleted, unless extended recovery is in use. This is the default type. This corresponds to the NO.RECOVERY stopType of the administration command.
3 — does not rerun the report. Any recovery information saved for the report is deleted. This corresponds to the DISCARD stopType of the administration command.
4 — reruns the report, attempting to recover up to and including any transaction it might have been processing when the StopReport method was entered. This corresponds to the RECOVER stop type of the administration command.
Two attempts are made to recover the report. If these both fail, a message is sent to the errorlog and no further attempts are made.
Security
Users must be a member of one of the following COM+ roles in order to access this administrative function:
Report Runners (only able to stop reports they have initiated)
Report Operators
Report Administrators
Application Administrators