ITabTableStyle.PredefinedStyle

Fore Syntax

PredefinedStyle: TabTablePredefinedStyle;

Fore.NET Syntax

PredefinedStyle: Prognoz.Platform.Interop.Tab.TabTablePredefinedStyle;

Description

The PredefinedStyle property returns the value of alternating table style used on the report sheet.

Comments

Use this property to determine whether the alternating style is preinstalled or created by the user.

If property returns the Undefined value, the alternating style is created by the user.

Fore Example

Create a regular report and a module, bind the module to the report to execute an example. Add links to the Report, Tab and Ui system assemblies in the module. Create on the report sheet the  hyperlink to this procedure.

Sub UserProc;
Var tstyle : ITabTableStyle;
    tab : ITabSheet;
    i : Integer;
    s : String;
    
Function getst(j : String): String;
Var t : String;
Begin
    
Select Case j
        
Case "-1": t := "Undefined";
        
Case "0": t := "Blue";
        
Case "1": t := "DarkBlue";
        
Case "2": t := "Red";
        
Case "3": t := "DarkRed";
        
Case "4": t := "Green";
        
Case "5": t := "DarkGreen";
        
Case "6": t := "Purple";
        
Case "7": t := "DarkPurple";
        
Case "8": t := "Orange";    
        
Case "9": t := "DarkOrange";
    
End Select;
    
Return t;
End Function getst; 

Begin
    tab := (PrxReport.ActiveReport.ActiveSheet 
As IPrxTable).TabSheet;
    
For i := 0 To tab.TableStyles.Count - 1 Do
        tstyle := tab.TableStyles.Item(i);
        s := s + tstyle.Name + 
": " + getst(tstyle.PredefinedStyle.ToString) + #13+#10;
    
End For;
    WinApplication.InformationBox(s);
End Sub UserProc;

The information message with preinstalled table styles used on the report sheet are displayed by clicking the button.

Fore.NET Example

To execute an example, create the regular report, create the  event handler  OnBeforeOpenReport, add links to the Report, tab, Forms.NET and Ui system assemblies in it. To execute an example the getst function, described in the Fore Example, is also required. Add it to event handler.

    Imports Prognoz.Platform.Interop.Report;
    Imports Prognoz.Platform.Interop.tab;
    Imports Prognoz.Platform.Forms.Net;
    Imports Prognoz.Platform.Interop.Ui;

    Public Override Sub OnBeforeOpenReport(Report : IPrxReport; Var Cancel : Boolean);
    Var tstyle : ITabTableStyle;
        tab : ITabSheet;
        i : Integer;
        s : String;
        WinAppCls:WinApplicationClassClass=New WinApplicationClassClass();
    Begin
    tab := Report.ActiveSheet.Table;
        For i := 0 To tab.TableStyles.Count - 1 Do
            tstyle := tab.TableStyles.Item[i];
            s := s + tstyle.Name + ": " + getst(tstyle.PredefinedStyle.ToString()) + char.ConvertFromUtf32(13) + char.ConvertFromUtf32(10);
        End For;
        WinAppCls.InformationBox(s,Null);
    End Sub OnBeforeOpenReport;

Information message with a list of alternating table styles used on the report sheet is shown before opening and after an example execution.

See also:

ITabTableStyle