Help - Search - Members - Calendar
Full Version: Load an rtf file with images
Fast Reports forum > Fast Reports Products > FastReport 3.0
bruce2
I found this snippet of code
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
gordk
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.
bruce2
QUOTE(gordk @ Jul 28 2008, 07:59 AM) *
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
gordk
whoops try richview.richedit.lines.loadfromfile();
bruce2
QUOTE(gordk @ Jul 29 2008, 02:56 PM) *
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
gordk
Bruce
Check the stretch setting of the rtfmemo and the stretch and allowsplit settings of the band which contains the rtfmemo.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.