Export: IMetabaseObject;
The Export method exports a model displayed in the component to a regular report.
The method work results in the object that contains a regular report. This regular report will be opened for edit.
Executing the example requires that the repository contains a form with the following:
A button with the Button1 identifier
The ModelBox component with the ModelBox1 identifier.
The UiModel component with the UiModel1 identifier. The UiModel1 component is a data source for ModelBox1.
Add links to the Metabase, Ms, Report, and Ui system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Obj: IMetabaseObject;
Rep: IPrxReport;
Begin
Obj := ModelBox1.Export;
Rep := Obj As IPrxReport;
If (Rep <> Null) Then
Rep.SaveToFile("c:\my.ppreport", PrxReportSaveMode.Full);
End If;
End Sub Button1OnClick;
After executing the example the model displayed in the ModelBox1 component will be transformed into the regular report and exported in the my.ppreport report file.
See also: