Report: IUiReport;
The Report property determines the UiReport development environment component, which is used as a data source.
Executing the example requires a form with the button named Button1 on it, the UiReport component named UiReport1, the ReportFormulaBar component named ReportFormulaBar1 and any visual components enabling the user to display and edit regular report data (ReportBox, TabSheetBox, and so on). The repository requires a regular report with the REGULAR_REPORT identifier.
Add a link to the Metabase system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Report: IPrxReport;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Bind As IPrxReport;
UiReport1.Report := Report;
UiReport1.Active := True;
ReportFormulaBar1.Report := UiReport1;
End Sub Button1OnClick;
On executing the example the specified regular report will be set as a data source for the UiReport1 component, after which the component is activated and used as a data source for ReportFormulaBar1. ReportFormulaBar1 provides a possibility to view and edit data or formula of the cell selected in the report.
See also: