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

 Report.Execute(Number: Integer, Parameters: Text [, RecordRef: RecordRef])

Parameters

Number
 Type: Integer
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
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
The RecordRef that refers to a record in a table.

Remarks

You typically use this method together with the RunRequestPage Method method. The RunRequestPage Method) runs a report request page without actually running the report, but instead, 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.

For RunRequestPage Method method topic.

See Also

Report Data Type
Get Started with AL
Developing Extensions