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

How to change mailmerge-fields in a ppRichEdit?

edited March 2003 in General
Hi
I want to format datafields (currency) in a ppRichEdit. Where is the right
place to catch, format (change) and set the value of specific fields? Is it
possible to do it in this way:
FieldName('Money').Value := Format('0,00 ?', FieldName('Money').Value);

A little example would be fine!

Regards
Andy

Comments

  • edited March 2003
    Andy,

    Check out the RBAddOn Component Set, available from our web site at
    http://www.digital-metaphors.com in the Friends | RCL section. This
    provides extra RB components that extend formatting of the merge fields.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2003
    Thank you, but it doesn't work with D7 and RB702.
    Is there a possibility to include an event "OnBeforePrintMailMerge(Sender:
    TObject; Field: TField)"
    to the ppRichText-Component? In this case you can check the Fieldtype
    (Currency, Date etc.) and the Value (Variant?) and set a new Value.
    I hope this could easily be includet.

    Regards

    Andy
  • edited March 2003
    Andy,

    Thanks for the suggestion. You can rebuild the RBAddOn packages yourself
    rather than wait for the next release of RBAddOn Components. Below is an
    article explaining how to do this...

    --------------------------------------------
    Article: Recompiling RBAddOn
    --------------------------------------------

    1. In Delphi, remove the RBAddOn package from the Design Packages List
    (Component | Install Packages), check the Default checkbox and click OK.

    2. In Delphi, change the library path (Tools | Environment Options, Library
    tab). Click the ellipses on the right of Library Path and remove any path to
    the RBAddOn\Lib directory. Add a path to the RBAddOn\Source directory.

    3. In Delphi, click Tools | Environment Options. Select the Library tab.
    Click the ellipses beside the BPL output directory and change it to (C:)
    \Windows\System (the system directory, may be \WinNT\System32 on NT).

    4. In Delphi, load the RBAddOn??D5RB???R.dpk package. (If you are
    re-building
    to install in Delphi 6 remove all files in the Requires list of the
    package.)
    Right click on Contains and select Build. Once the package has been rebuilt
    reset the BPL output directory to its original setting
    (usually ($Delphi)\Projects\BPL).

    5. In Delphi, load the RBAddOn??D5RB???D.dpk package. (If you are
    re-building
    to install in Delphi 6 remove all files in the Requires list of the
    package.)
    Right click on Contains and select Build. Once the package has been rebuilt
    click Install to install the package.


    --
    Best Regards,

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