TfrxRichView : Formatted text doesn't appear on some installation

edited 10:20PM in FastReport 4.0
Dear all,

I try to insert rich text in a TfrxRichView on a report.

I put a TfrxRichView (named Rich1) in a Child Band.

On event "OnBeforePrint" I link this code :
procedure Rich1OnBeforePrint(Sender: TfrxComponent);
var
  L : String;                                          
begin
       TfrxRichView( Sender ).RichEdit.Lines.Clear();                                                                               
  L:='{\rtf1\ansi\deff0  {\fonttbl {\f0 Arial;}}';  
  L:= L+'{\colortbl;\red0\green0\blue0;\red255\green0\blue0;}';
  L:= L+'This line is the default color\line';  
  L:=L+'\cf2';
  L:=L+'This line is in red\line';
  L:=L+'\cf1';
  L:=L+'This line is the default color';
  L:=L+'}';                        
  TfrxRichView(Sender).RichEdit.Lines.Add(L);                                                                                                             
    
end;

On my Dev virtual machine (with Delphi ... installed), when I preview this report, It doesnt work. (see rtfbad.png in attachment)

Comments

Leave a Comment