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

mail merger

edited April 2003 in End User
Hi,
I have a data file where many of its fields using short code to
represent its content e.g. M = married, S = Single. Is there any simple way
using the mail merge feature of rich text to show more readable word from
these fields i.e. print the word 'married' for 'M' or even do some simple
calculation for certain fields?

Thanks

Jonathan Liaw

Comments

  • edited April 2003
    One way to do it is to code an event handler in the report. Use a
    TppVariable. It defaults to a string type. Then in the TppVariable.OnCalc
    event handler, reference the report's data pipeline to get the M or S field
    value and display the full string:
    var
    lsMaritalStatus: String;
    begin
    lsMaritalStatus := Report.DataPipeline['MartialStatusFieldNameHere'];

    if lsMaritalStatus = 'M' then
    Value := 'Married'
    else
    Value := 'Single';
    end;

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited May 2003
    Thanks Jim.
This discussion has been closed.