HtmlText: String;
The HtmlText property determines title text in the HTML markup language.
The property is relevant if the IGxTitle.Visible property is set to True.
Executing the example requires that the repository contains an express report with the EXPRESS_FORMATTEDTEXT identifier, which contains a table.
Add links to the Drawing, Express, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Title: IGxTitle;
HTML, HtmlTitle: String;
Converter: ITextConverter;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS_FORMATTEDTEXT").Edit As IEaxAnalyzer;
// Get title bar
Title := Express.TitleBar;
// Determine title value format
Title.CustomFormat := "# ##0,00";
// Display title text in the HTML markup language
HtmlTitle := Title.HtmlTitle;
Debug.WriteLine("Report title text in the HTML markup language - " + HtmlTitle);
// Make changes
HTML := "<span style=""font-size: 8pt;color: #000000;text-align: left;font-family: Arial; "">" +
"<span style=""color: #ff0000;font-size: 10pt;font-family: inherit;"">Important </span>" +
"<span style=""color: #0000ff;font-style: italic;font-size: 8pt;font-family: inherit;"">text</span></span>" ;
// Transformation into RTF from HTML
Converter := New TextConverter.Create;
Title.FormattedText := Converter.Export(HTML, TextFormat.Rtf);
// Make report title visible
Title.Visible := True;
Title.IsControl := False;
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the console window displays a new report title text in the HTML markup language, the report title text is changed in the express report.
See also: