Exits from a loop or a trigger in a data item trigger of a
dataport, report, or XMLport.
Remarks
Example
This example of code in a report object requires that
you create the following variable and text constant in the C/AL
Globals window.
Variable name |
DataType |
MyVar
|
Integer
|
Text constant |
ENU value |
Text000
|
The variable is now %1.
|
|
Copy Code |
REPEAT
MyVar := MyVar + 1;
IF MyVar = 5 THEN
CurrReport.BREAK;
MESSAGE(Text000,MyVar);
UNTIL Myvar = 10
|
When you run the preceding code, the loop will end when
MyVar is 5.
See Also