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
Thank you in advance
Comments
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;