OpenFile Command

Purpose

Opens an express report saved to file.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:

Value type Description
String The path and name of the file, to which the express report is saved.

Application Features

The command is used only for express reports saved to a file (files with the extension *.ppexpress).

Example

Executing the example requires a form, a button with the Button1 name located on the form and an express report saved to the express.ppexpress file.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        Target: IUiCommandTarget;
        Context: IUiCommandExecutionContext;
    Begin
        Target := WinApplication.Instance.GetPluginTarget("Express");
        Context := Target.CreateExecutionContext;
        Context.Data := "c:\express.ppexpress";
        Target.Execute("OpenFile", Context);
    End Sub Button1OnClick;

Clicking the button opens the express report saved to the express.ppexpress file.

See also:

IUiCommandTarget.Execute