IPrxAssemblies.Add

Syntax

Add(Assembly: IMetabaseObjectDescriptor): Integer;

Parameters

Assembly. Description of the development environment object that should be included in the list of objects used in a regular report.

Description

The Add method connects a development environment object to a regular report and returns index of the connected object in the list.

Comments

The list of available objects includes all units, forms, assemblies of the repository.

A development environment object is connected to a regular report and table for later event handling.

To connect a development environment object to a regular report included in data entry form, use the IPrxAssemblies.AddEx method.

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier and a unit with the MODULE identifier.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    MBDesc: IMetabaseObjectDescriptor;
    Report: IPrxReport;
    Assemb: IPrxAssemblies;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    MBDesc := MB.ItemById("MODULE");
    MObj := MB.ItemById("REPORT").Edit;
    Report := MObj As IPrxReport;
    Assemb := Report.Assemblies;
    i := Assemb.Add(MBDesc);
    MObj.Save;
End Sub UserProc;

After executing the example, the specified unit is connected to the regular report, and the "i" variable contains index of this unit in the general list.

See also:

IPrxAssemblies