IDefInputAreas.TransposeTableAreaWithGrid

Syntax

TransposeTableAreaWithGrid(areaId: String);

Parameters

areaId. Identifier of the table area to be transposed.

Description

The TransposeTableAreaWithGrid method transposes the specified table area and applies changes to data entry form report.

Comments

During transposing, sidehead dimensions are moved to the heading, and heading dimensions are moved to the sidehead. If the specified table area has been already transposed, sidehead and heading dimensions are returned to their initial positions after the method is executed again.

Example

Executing the example requires a data entry form, for which the specified macro is set as an executable method for a custom button. Sheets and some data entry areas are created in the data entry form.

Add links to the Metabase, Report system assemblies. Add links to the assemblies required for working with data entry forms.

Public Sub Transpose(Report: IPrxReport);
Var
    Mb: IMetabase;
    DEForm: IDataEntryForm;
    Areas: IDefInputAreas;
    TArea: IDefTableArea;
    i, c: Integer;
Begin
    Mb := MetabaseClass.Active;
    
// The current data entry form instance
    DEForm := New DataEntryForm.CreateByReport(Report);
    
// Get all data entry areas
    Areas := DEForm.InputAreas;
    c := Areas.Count - 
1;
    
For i := 0 To c Do
        
// If it is table area, transpose it
        If Areas.Item(0Is IDefTableArea Then
            TArea := Areas.Item(
0As IDefTableArea;
            
If Not TArea.Transposed Then
                Areas.TransposeTableAreaWithGrid(TArea.Id);
            
End If;
        
End If;
    
End For;
End Sub Transpose;

After the macro is executed, all data entry areas are checked in the data entry form. Table areas will be transposed if they were not transposed before.

See also:

IDefInputAreas