Assign text with formatting into TfrxRichView

What is the best way to transfer formatted text from TCustomRichEdit component in Delphi into report?
I tried to do that via variable, but it looses the formatting?
if VarName = 'Content' then Value := RzRichEdit.Text;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:40AM
    use the obp event of the tfrxreport component.
    if sender.name = 'Richedit1' then
    begin
    write code to assign the lines of your delphi richeditcontrol to the lines of the tfrxrichview.
    end
  • edited 4:40AM
    If you mean like this:
    procedure Tdialog_CoverLetter.frxReportBeforePrint( Sender: TfrxReportComponent);
    begin
      If sender.Name = 'RichContent' then
        TfrxRichView( Sender ).lines.assign( RzRichEdit.Lines );
    end;
    

    For some reason the TfrxRichView doesn't have lines-property visible??
  • gordkgordk St.Catherines On. Canada.
    edited 4:40AM
    no it has a richedit property that does.
    TfrxRichView( Sender ).richedit.lines.assign( RzRichEdit.Lines );

Leave a Comment