Load an rtf file with images

edited 3:19PM in FastReport 3.0
I found this snippet of code
var
 RichView: TfrxRichView;
 Stream: TMemoryStream;
 Str: string;
begin
 RichView := TfrxRichView(frxReport2.FindObject('Rich1'));
 if RichView = nil then
   Exit;
 Stream := TMemoryStream.Create;
 try
   Stream.LoadFromFile('my.rtf');
   SetLength(Str, Stream.Size);
   Stream.Read(Str[1], Stream.Size);
   RichView.RichEdit.Text := Str;
 finally // wrap up
   Stream.Free;
 end;    // try/finally
 if frxReport2.PrepareReport then
   frxReport2.ShowPreparedReport;
end;

It works just as it is supposed to....but, the file I want to load has images. They don't show up in the report. Do I need to set something?

Also, where the heck can I download the help doc's for version 3 ????????

Thanks all,

bruce

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:19PM
    Bruce in stead of all the manipulation where you are only handling the strings into text.
    try richviw.richedit.loadfromfile('path&filename');
    docs can be found on product page under downloads.
  • edited 3:19PM
    gordk wrote: »
    Bruce in stead of all the manipulation where you are only handling the strings into text.
    try richviw.richedit.loadfromfile('path&filename');
    docs can be found on product page under downloads.

    Hey gordk,

    Thanks for the reply, but the Richview.RichEdit.LoadFromFile(...) returns.....Undeclared Identifier: 'LoadFromFile'.

    Any other suggestions?

    Thanks,

    Bruce
  • gordkgordk St.Catherines On. Canada.
    edited 3:19PM
    whoops try richview.richedit.lines.loadfromfile();
  • edited July 2008
    gordk wrote: »
    whoops try richview.richedit.lines.loadfromfile();

    Hey gordk,

    This works fine but it seems that it only shows the first page of a two page rtf file.

    Sorry for asking so many dumb questions.

    Bruce
  • gordkgordk St.Catherines On. Canada.
    edited 3:19PM
    Bruce
    Check the stretch setting of the rtfmemo and the stretch and allowsplit settings of the band which contains the rtfmemo.

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.