Report.RunModal() Method
Version: Available or changed with runtime version 1.0.
Loads and executes the report that you specify.
Syntax
Report.RunModal()
Parameters
Report
Type: Report
An instance of the Report data type.
Remarks
After you define the Report variable, you can run this method or the Run Method (Report) on the variable. As opposed to the Run method, with the RunModal method, the variable is not cleared after it executes this function. You must handle clearing the variable.
Use the RunModal method or the Run method if you know at design time the exact report you want to run. Otherwise, use the Report.RunModal Method or Report.Run Method.
The request page is run modally when you use this method.
Note
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. 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.
Example
var
CustomerRec: Record Customer;
SalesReport: Report "Chart of Accounts";
begin
…
Clear(CustomerRec);
CustomerRec.SetRecFilter;
SalesReport.SetTableView(CustomerRec);
SalesReport.RunModal();
end;
See Also
Report.RunModal (static) Method
Report Data Type
Get Started with AL
Developing Extensions
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應