{"title":"OnPostReport (Report Extension) trigger","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/triggers-auto/reportextension/devenv-onpostreport-reportextension-trigger/","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/triggers-auto/reportextension/devenv-onpostreport-reportextension-trigger, 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/triggers-auto/reportextension/devenv-onpostreport-reportextension-trigger","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":"Runs after a report is run.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"OnPostReport (Report Extension) trigger","slug":"onpostreport-report-extension-trigger","at":0,"chars":1366},{"level":2,"title":"Syntax","slug":"syntax","at":130,"chars":62},{"level":2,"title":"Remarks","slug":"remarks","at":192,"chars":816},{"level":2,"title":"Related information","slug":"related-information","at":1008,"chars":358}],"text":"# OnPostReport (Report Extension) trigger\n> Version: _Available or changed with runtime version 7.0._\nRuns after a report is run.\n## Syntax\n```al\ntrigger OnPostReport()\nbegin\n    ...\nend;\n```\n## Remarks\nThis trigger is run after all data items are processed and after the base report's OnPostReport trigger. The trigger is not run if the report was stopped manually or by using the Quit before processing had concluded. Learn more about report trigger flow in Report triggers and runtime operations<../../devenv-report-triggers#overall-report-trigger-and-operations>.\nBecause this trigger is run after the report is processed, you can use it to inform users about the result of the report run. For example, if some records could not be processed, you could inform the user of this using the following code in this trigger.\n```al\nif ProblemsInReport then\nMessage(Text000, NumberOfErrors);\n```\nCreate the following global text constant variable.\nText constant|ENU value\nText000|'%1 records were not processed'\n## Related information\n../report/devenv-onpostreport-report-trigger\nOnPreReport (report extension) trigger<devenv-onprereport-reportextension-trigger>\n../report/devenv-onprereport-report-trigger\nReport triggers and runtime operations<../../devenv-report-triggers>\nGet started with AL<../../devenv-get-started>\nDeveloping extensions<../../devenv-dev-overview>"}