FR 6.9.2 frxRichView png file is not displayed correctly in report

edited March 2023 in FastReport VCL

Hi,

we have a report with frxRichView item on it. This shows the rtf content of a file.

if the file contains a png image it will be displayed correctly if the png file has got a low size e.g. 5 KByte,

If the image file is larger, then the raw content of the rtf is shown in the report in addition the report contains more then 100 pages.

Any Idea whats might be wrong?

Thanks in advance Klaus

Comments

  • please find in attach the two examples Bild1.rtf will not be shown correctly in fr report.

    The second example Bild2.rtf will be shown correctly in fr report.

    This is how rtf will be loaded to the fr report:

    procedure TDlgProtausgabe.frxRtfProtAusgabeNewGetValue(Sender: TObject; const VarName: string; var Value: Variant);

    var

     query: TIB_Query;

     fs: TFileStream;

     fValue: String;

    begin

     if varName = 'protokoll' then

     begin

       query := TIB_Query.Create(nil);

       try

         query.IB_Connection := ibConnection;

         query.SQL.Text := ' select p.d_pr_txt as rtfProtokoll from d_pr_prot p where p.d_pr_id = :protId';

         query.ParamByName('protId').AsInteger := frxIBOprotausgabe.DataSet.FieldByName('ProtID').AsInteger;

         query.Open();

         if query.RecordCount = 1 then

         begin

            Value := query.FieldByName('rtfProtokoll').AsRawString;

         end;

       finally

         query.Free;

       end;

     end;

    end;

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.