# Report.Execute(Integer, Text [, RecordRef]) Method
> Version: _Available or changed with runtime version 1.0._
Runs a report in preview or processing-only mode without showing the request page in the client. The preview document will be downloaded as a PDF file to the user's browser client, where it can be read with the PDF reader. It won't open the Business Central preview page in the browser. The method gets the request page parameter values as an input parameter string from a RunRequestPage method call. The OnOpen and OnClose triggers on the request page will run even though the request page is not shown.
## Syntax
```al
 Report.Execute(Number: Integer, Parameters: Text [, RecordRef: RecordRef])
```
## Parameters
Number
Type: ../integer/integer-data-type
The ID of the report that you want to run. If the report that you specify does not exist, then a run-time error occurs.
Parameters
Type: ../text/text-data-type
A string of request page parameters as XML to use to run the report. The parameter string is typically retrieved from the return value a RunRequestPage method call.
*[Optional] RecordRef*
Type: ../recordref/recordref-data-type
The RecordRef that refers to a record in a table.
## Remarks
You typically use this method together with the report-runrequestpage-method method. The report-runrequestpage-method) runs a report request page without actually running the report, but instead, it returns the parameters that are set on the request page as a string. You can then call the Execute method to get the parameter string and run the report.
See report-runrequestpage-method.
> NOTE
> Be careful when crafting the string for the RunRequestPage parameter without using the RunRequestPage method. If the XML content is malformed, then a runtime error might occur when calling Report.Execute.
> NOTE
> The Report.Execute method isn't supported for reports running with an Excel Layout.
## Example (using `Report::<object identifier>` syntax)
As mentioned above, the Report.Execute method will throw a runtime error if no report with the supplied object ID exists. If you know the report object, a safe way to call Report.Execute is to use the `Report::<object identifier>` syntax as the compiler will tell you if the report object doesn't exist.
```al
procedure MyProcKnownReport()
var
    RequestPagePayload: Text;
begin
    RequestPagePayload := Report.RunRequestPage(Report::MyReport);
    Report.Execute(Report::MyReport, RequestPagePayload);
end;
```
## Related information
report-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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/report-execute-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. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/report-execute-method/
