Load an rtf file with images

edited 2:05AM 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 2:05AM
    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 2:05AM
    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 2:05AM
    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 2:05AM
    Bruce
    Check the stretch setting of the rtfmemo and the stretch and allowsplit settings of the band which contains the rtfmemo.

Leave a Comment