IPrxSheet.Type

Syntax

Type: PrxSheetType;

Description

The Type property returns the sheet type.

Comments

Different interfaces are used to work with a regular report sheet depending on its type: IPrxTable for the PrxSheetType.Table value and IPrxJsPlugin for the PrxSheetType.JsPlugin value.

Example

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

Add links to the Metabase, Report, Ui system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    Sheet: IPrxSheet;
    Sheets: IPrxSheets;
    SheetTab: IPrxTable;
    i: Integer;
Begin
    
// Get current repository
    MB := MetabaseClass.Active;
    
// Get report
    Report := Mb.ItemById("REPORT").Edit As IPrxReport;
    
// Get report sheets
    Sheets := Report.Sheets;
    // Determine, which sheets are of table type
    For i := 0 To Report.Sheets.Count - 1 Do
        Sheet := Report.Sheets.Item(i);
        
If Sheet.Type = PrxSheetType.Table Then
            SheetTab := Sheet 
As IPrxTable;
            
//Display message
            WinApplication.InformationBox(
"Sheet " + Sheet.Name + " of table type");
        
End If;
    
End For;
End Sub UserProc;

After executing the example the message about table sheet existence in the report, containing sheet name, is displayed. The number of displayed messages is equal to the number of report table sheets.

See also:

IPrxSheet