Udostępnij za pośrednictwem


RUNMODAL Function (Report)

Loads and executes the report that you specify.

Syntax

  
Report.RUNMODAL  

Parameters

Report
Type: Report

After you define this variable, you can run this function or the Report.RUN function on the variable. As opposed to the Report.RUN function, the system does not automatically clear the variable after it executes this function. You must handle clearing the variable.

Remarks

Use this function or the RUN Function (Report) if you know at design time the exact report you want to run. Otherwise, use the REPORT.RUNMODAL Function or REPORT.RUN Function.

If the report you specify does not exist, then a compile error occurs.

The request page is run modally when you use this function.

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.

Example

This example requires that you create the following variables.

Variable name DataType Subtype
CustomerRec Record Customer
SomeReport Report Chart of Accounts
…  
CLEAR(CustomerRec);  
CustomerRec.SETRECFILTER;  
SomeReport.XXX; // Any user-defined function.  
SomeReport.SETTABLEVIEW(CustomerRec);  
SomeReport.RUNMODAL()  

See Also

Report Data Type