You can use the LoadFromFile or LoadFromRTFStream routines to load RTF data into a TppRichText control. See the TppRichText documentation for more information about these routines.
Thanks for the help. I have checked the guide but I was just not sure how to properly structure my statement.
The richtextholder is on the detail band of the report and I simply wanted to replace what is there in the run time editor with a rich text file of my own.
Comments
You can use the LoadFromFile or LoadFromRTFStream routines to load RTF
data into a TppRichText control. See the TppRichText documentation for
more information about these routines.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for the help. I have checked the guide but
I was just not sure how to properly structure my statement.
The richtextholder is on the detail band of the report and I simply wanted
to replace what is there
in the run time editor with a rich text file of my own.
so is it something like:
ReportFrm.LetterLayout.DetailBand.RichTextHolder.LoadFromFile('myfile.rtf');
thanks
Kamran
If the RTF file can change at every detail record, then:
procedure TReportFrm.ppDetailBand1BeforePrint(Sender: TObject);
var
fName: string;
begin
fName:= ;
if FileExists(fName) then
ppRichText1.LoadFromFile('fName')
else
ppRichText1.RichText:=''; // clear previously loaded RTF text
// ppRichText1.Clear; instead?
end;
If it never changes, then just put the same code in your
TReportFrm.OnCreate event.
Cheers,
EdB