IErAnalyzerTitle.SetSel

Syntax

SetSel(Begin_: Integer; End_: Integer);

Parameters

Begin_. Start position of selected section in the header.

End_. End position of selected section in the header.

Description

The SetSel method selects needed section in the express report header.

Comments

For total selection of express report selection, use IErAnalyzerTitle.SelectAll.

Example

Executing the example requires that the repository contains form with the following components:

Express report with active header must be set for UiErAnalyzer1 as data source.

Sub UserProc;
Var
    Xaml: String;
Begin
    // Enable edit mode for header
    ErAnalyzerTitle1.StartEdit;
    // Select header section
    ErAnalyzerTitle1.SetSel(ErAnalyzerTitle1.BeginSel + 1, ErAnalyzerTitle1.EndSel - 1);
    // Cut selected section
    ErAnalyzerTitle1.Cut;
    // Insert dimension name
    ErAnalyzerTitle1.InsertSelection;
    // Set express report name
    ErAnalyzerTitle1.InsertName;
    // Insert current time
    ErAnalyzerTitle1.InsertTime;
    // Insert current time
    ErAnalyzerTitle1.InsertDate;
    // Insert specified text
    ErAnalyzerTitle1.InsertText("Added_text");
    // Insert cut section
    ErAnalyzerTitle1.Paste;
    // Set bold underlined italic
    ErAnalyzerTitle1.Bold := True;
    ErAnalyzerTitle1.Italic := True;
    ErAnalyzerTitle1.Underline := True;
    // Set size and font family
    ErAnalyzerTitle1.FontSize := 20;
    ErAnalyzerTitle1.FontFamily := "Arial";
    // Select all the header
    ErAnalyzerTitle1.SelectAll;
    // Copy header text in clipboard
    ErAnalyzerTitle1.Copy;
    // Insert to header
    ErAnalyzerTitle1.Paste;
    // Get header text in  the RTF format
    Xaml := ErAnalyzerTitle1.Xaml;
    // Display to the console header text used to be shown in the RTF format
    Debug.WriteLine("Header text used to be shown in the RTF format - " + Xaml);
    // Finish header editing
    ErAnalyzerTitle1.EndEdit;
End Sub UserProc;

After executing the example all properties and methods specified above will be applied to the express report header.

See also:

IErAnalyzerTitle