CreateByDataEntryForm(descriptor: IMetabaseObjectDescriptor; forEdit: Boolean);
descriptor. Description of existing repository object that is a data entry form
forEdit. Indicates whether data entry form is opened for edit.
The CreateByDataEntryForm constructor creates a data entry form instance based on existing repository object.
Executing the example requires that the repository contains a data entry form, for which the specified macro is set as an executable method for a custom button.
Add links to the Dimensions, Metabase, Report system assemblies. Add links to the assemblies required for working with data entry forms.
Public Sub CreateAndEditDEF(Report: IPrxReport);
Var
DEFParent, DEFormDesc: IMetabaseObjectDescriptor;
DEForm: IDataEntryForm;
Begin
DEFParent := (Report As IMetabaseObject).Parent.Parent;
DEFormDesc := DataEntryForm.CreateInputForm("New data entry form", "NEW_DEF", DEFParent.Key);
DEForm := New DataEntryForm.CreateByDataEntryForm(DEFormDesc, True);
//...
// Set up new data entry form
//...
DEForm.Save;
DEForm._Dispose;
End Sub CreateAndEditDEF;
This macro generally shows how a new data entry form can be created and opened for edit.
See also: