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

TppRichText Full Justify ??

edited July 2003 in General
Is there any way I can Fully justify a TppRichText component in RBuilder ?

What I need is some text to be justified (left and right) AND formatted
(bold, italic, etc.).

Any hint (even if you think it's dumb) would be very appreciated.
Just to tell you how bad I need this, I'm thinking of capturing a screen
shot of the justified text previously typed in word and insert it on my
report through an ppImage component!!

Thanks!

Comments

  • edited July 2003
    Hi Steve,

    The article below should help you get on the right track.


    ----------------------------------------------
    Article: ReportBuilder's RichText architecture
    ----------------------------------------------


    The RichText in ReportBuilder is a wrapper around Delphi's TRichEdit which
    in turn relies on Windows. There are two versions of Windows richedit -
    RichEd32.dll is the older one and RichEd20.dll is a newer one (RichEd32 is
    being phased out). Delphi by default relies on RichEd32 - the older version.
    To use some of the more advanced features of Windows RichEdit, see the topic
    on InfoPower RichEdit Support below.

    In general Windows RichEdit supports the type of formatting that you can do
    using WordPad.



    InfoPower RichEdit Support
    ---------------------------
    InfoPower from Woll2Woll Software is a popular database add-on product for
    Delphi. InfoPower's TwwRichEdit components support the Windows RichEdit2
    format. This format allows the rich text data to contain embedded bitmaps
    and OLE objects. For more information please see http://www.Woll2Woll.com.

    ReportBuilder includes a component that enables the TppRichText and
    TppDBRichText controls in ReportBuilder to use the formatting capabilities
    of InfoPower's TwwRichEdit when rendering RTF data. The ppWWRichEd.pas unit
    located in the ..\RBuilder\InfoPower directory defines a TwwDBRichEdit
    descendant and then registers the class with ReportBuilder. This enables the
    TppRichText and TppDBRichText controls in ReportBuilder to use the
    formatting capabilities of TwwDBRichEidt when rendering data.


    WPTools Support
    ----------------
    WPTools is a collection of components used to edit and print formatted text.
    With its own RTF engine, WPTools offers numerous features not supported by
    the standard Windows RichEd20.dll. This control lets you use tables,
    paragraph frames, headers and footers etc. Using the optional ReportBuilder
    support units for WPTools 2.x, you can print the enhanced WPTools features
    (justified text, tables, graphics...) within your ReportBuilder reports. For
    more information please see http://www.wptools.de.



    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Thanks for the hint but I still can't justify properly. I have IP4000
    installed and installed the patch as required but I still doesn't do what I
    need...

    Any more hint ?

  • edited July 2003
    Hi Steve,

    When using InfoPower, you will not see any changes in the RichEdit UI unless
    you create them yourself. You will need to produce the RichText you need
    wiht Full Justification separately using an InfoPower control and then copy
    that RichText stream to the ReportBuilder RichEdit control. This will give
    you the proper justification and formatting.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Thanks alot!
    I feel I get close to what I need!!

  • edited July 2003
    Hi Steve,

    You may need to copy the actual rich text from the IP component to a TStream
    and then write that stream to the TppRichText.RichText string. This would
    be a way to do the programatically. You can also copy/paste it if you need.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Hum....

    Now I got another problem.........

    When I went in the Richtext editor of ReportBuilder's RichEdit control,
    something strange occured. The RichEdit internal component of the editor
    got undocked from the editor and could not be closed. I had to end Delphi's
    process through the Task Manager to get out of there. I took a screenshot
    so you can take a look of it (hope this newsgroup handles images and
    attachments).

    How do I fix that ?

    Thanks!!

This discussion has been closed.