{"title":"Report.Run() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/reportinstance-run-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-run-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-run-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":"Loads and executes the report that you specify.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":108,"chars":34},{"level":2,"title":"Parameters","slug":"parameters","at":142,"chars":91},{"level":2,"title":"Remarks","slug":"remarks","at":233,"chars":1224},{"level":2,"title":"Example","slug":"example","at":1457,"chars":289},{"level":2,"title":"Related information","slug":"related-information","at":1746,"chars":134}],"text":"> Version: _Available or changed with runtime version 1.0._\nLoads and executes the report that you specify.\n## Syntax\n```al\n Report.Run()\n```\n## Parameters\nReport\nType: report-data-type\nAn instance of the report-data-type data type.\n## Remarks\nAfter you define the Report variable, you can run this method or the reportinstance-runmodal-method on the variable. With the Run method, the variable is automatically cleared after the method is run. With the RunModal method, the variable isn't automatically cleared.\nUse the Run method or the RunModal method if you know at design time the exact report that you want to run. Otherwise, use the static methods report-run-method or report-runmodal-method.\n> NOTE\n> Internet browsers can only handle one file per request. Therefore, with the Web client, if this method is called in a repetitive statement (or loop) that generates multiple files, only the last file will be sent to the browser. Alternatively, when designing for the Web client, bundle the files in an archive file (.zip), for example, by using the methods found in codeunit 419 File Management. For more details about this design pattern, see Multi-File Download<https://alguidelines.dev/docs/navpatterns/patterns/multi-file-download/>. The methods in codeunit 419 aren't external, therefore can't be used in extensions. Instead, when developing extensions in AL, use the external methods of codeunit 425 Data Compression. The approach is similar.\n## Example\n```al\nvar\n    CustomerRec: Record Customer;\n    SalesReport: Report \"Salesperson - Sales Statistics\";\nbegin\n    CustomerRec.SetCurrentKey(\"No.\");\n    CustomerRec.SetFilter(\"Salesperson Code\", 'JR|PS');\n    SalesReport.SetTableView(CustomerRec);\n\n    SalesReport.Run();\nend;\n```\n## Related information\nreport-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}