Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to Copy Contents of InfoPower TwwDBRichEdit Component to RB TppRichText component

edited November 2003 in General
How do you copy the contents of an InfoPower TwwDBRichEdit component into a
ReportBuilder TppRichText component?

I have tried the following code (from the tech-tips ng). This code works,
but it does not keep the BOLD, ITALICS, UNDERLINE, etc.

var
lRtfStream: TMemoryStream;
begin
// create the memory stream
lRtfStream := TMemoryStream.Create;

// save the TRichEd's rtf data to the memory stream
DataBaseRichEdit.Lines.SaveToStream(lRtfStream);

// load the rtf stream to the TppRichText
lRtfStream.Position := 0;
ReportRichText.LoadFromRTFStream(lRtfStream);
------------------------------------------------------

Another possible option: I can copy the TwwDBRichEdit to the clipboard
(DataBaseRichEdit.SelectAll, DataBaseRichEdit.CopyToClipboard). But I
cannot figure out how to Past the clipboard into the ReportBuilder
TppRichText component.

Delphi 6 Pro, InfoPower 4000, ReportBuilder Pro 6.03

TIA
--patrick

Comments

  • edited November 2003
    Hi Patrick,

    You need to install the InfoPower add-on package for ReportBuilder for all
    the richtext formatting to work with a TppRichEdit component. All the files
    you need and installation instructions are available in the
    \RBuilder\InfoPower\... directory.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.