Need help getting plain text from RichText object

I would like for someone to offer assistance with this small problem. Is there a way to get plain text value from Rich Text object? ERP software that my company uses has FastReport implemented and it gathers data from SQL database. On my report there is Rich Text object and I would like to extract plain text from the box (in database field text is recorded in rtf form, and I cannot convert it there). Any suggestions?

Thank you in advance

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:18PM
    try working in the oad event of the rtf object
    here is a sample to strip blank lines
    procedure Rich1OnAfterData(Sender: TfrxComponent);
    var
    i: Integer;
    s: String;
    begin
    for i := Rich1.RichEdit.Lines.Count - 1 downto 0 do
    begin
    s := Rich1.RichEdit.Lines;
    if Trim(s) = '' then
    Rich1.RichEdit.Lines.Delete(i);
    end;
    end;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.