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 full selection of express report header, use IErAnalyzerTitle.SelectAll.

Example

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

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

Sub UserProc;
Var
    Xaml: String;
Begin
    // Toggle header to the edit mode
    ErAnalyzerTitle1.StartEdit;
    // Select header section
    ErAnalyzerTitle1.SetSel(ErAnalyzerTitle1.BeginSel + 1, ErAnalyzerTitle1.EndSel - 1);
    // Cut selected section
    ErAnalyzerTitle1.Cut;
    // Insert dimension name
    ErAnalyzerTitle1.InsertSelection;
    // Insert express report name
    ErAnalyzerTitle1.InsertName;
    // Insert the current time
    ErAnalyzerTitle1.InsertTime;
    // Insert the current date
    ErAnalyzerTitle1.InsertDate;
    // Insert the specified text
    ErAnalyzerTitle1.InsertText("Added_text");
    // Paste the cut section
    ErAnalyzerTitle1.Paste;
    // Set bold underline italics font style
    ErAnalyzerTitle1.Bold := True;
    ErAnalyzerTitle1.Italic := True;
    ErAnalyzerTitle1.Underline := True;
    // Set font size and family
    ErAnalyzerTitle1.FontSize := 20;
    ErAnalyzerTitle1.FontFamily := "Arial";
    // Select whole header
    ErAnalyzerTitle1.SelectAll;
    // Copy header text to the clipboard
    ErAnalyzerTitle1.Copy;
    // Paste to header
    ErAnalyzerTitle1.Paste;
    // Get header text in the RTF format
    Xaml := ErAnalyzerTitle1.Xaml;
    // Display header text used for presenting in the RTF format in the console window
    Debug.WriteLine("Header text used for presenting 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