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 8:50AM
    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 8:50AM
    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 8:50AM
    no it has a richedit property that does.
    TfrxRichView( Sender ).richedit.lines.assign( RzRichEdit.Lines );

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.