Load data in to TfrxHTMLView at runtime

Hi, I would like to assign HTML data to a TfrxHTMLView object at runtime. For this purpose, I have set up a report with a TfrxHTMLView object. The HTML data is available as a string (InhaltHTML). I wrote the following procedure:

 procedure frxReportBeforePrint (Sender: TfrxReportComponent);

If Sender.Name = <name of TfrxHTMLView object>

  then TfrxHTMLView (Sender).HtmlViewer.Text: = InhaltHTML;

 At runtime I get an error message (access violation at ... read of address ...). The error message occurs with the Vcl.Graphics function TFont.GetSize.

The HTML string can be displayed in a TWebBrowser component without errors.

What is wrong? Are there other ways to assign data to a TfrxHTMLView object at runtime? I am using the FastReport VCL 2021.3.1 version. 

Comments

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.