Search code examples
crystal-reports

crystal reports multiple function in formula


I am looking to execute 2 Replace functions on the same report field.

When I try

Replace({letter_master.letterBody},'{provider}',{provider.provider_name});
Replace({letter_master.letterBody},'{TotalBalance}',ToText(ToNumber({visit_master.value_7})))

as the formula for the letterBody field, only the second replace is returned.

How can I execute BOTH replace statements on the letterBody field to get both placeholders replaced with real data.


Solution

  • try..

    Replace(
    Replace({letter_master.letterBody},'{provider}',provider.provider_name})
    ,'{TotalBalance}',ToText(ToNumber({visit_master.value_7})))