{"title":"Report.Break() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/reportinstance-break-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-break-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-break-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Exits from a loop or a trigger in a data item trigger of a report or XmlPort.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":138,"chars":36},{"level":2,"title":"Parameters","slug":"parameters","at":174,"chars":91},{"level":2,"title":"Remarks","slug":"remarks","at":265,"chars":601},{"level":2,"title":"Example","slug":"example","at":866,"chars":488},{"level":2,"title":"Related information","slug":"related-information","at":1354,"chars":134}],"text":"> Version: _Available or changed with runtime version 1.0._\nExits from a loop or a trigger in a data item trigger of a report or XmlPort.\n## Syntax\n```al\n Report.Break()\n```\n## Parameters\nReport\nType: report-data-type\nAn instance of the report-data-type data type.\n## Remarks\nBREAK causes the current trigger to end. When used inside a loop, such as a WHILE-DO or REPEAT-UNTIL construction, BREAK interrupts the loop and causes the current trigger to end.\nCompare this with the QUIT Method \\(Report, XMLport\\)<reportinstance-quit-method>.\n> NOTE\n> BREAK still calls remaining triggers for the current record, but the record is omitted from the dataset.\n> TIP\n> You can also use the AL BREAK Statement<../../devenv-al-control-statements> to exit an iteration or loop. The difference is that the BREAK statement does not terminate the trigger. It just exits the loop.\n## Example\n```al\nvar\n    MyVar: Integer;\n    Text000: Label \"The variable is now %1.\";\nbegin\n    MyVar := 0;\n    repeat\n      MyVar := MyVar + 1;\n      if MyVar = 5 then\n        CurrReport.BREAK;\n      Message(Text000,MyVar);\n    until Myvar = 10;\n    Message('After REPEAT-UNTIL loop'); //This statement is never called.\nend;\n```\nWhen you run the previous code, the loop will end when MyVar is 5 and the execution of the current trigger ends. Statements after the loop are not executed.\n## Related information\nreport-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}