Skip to Content

How to change currency type according to currency

local numbervar x := {Invoice_Detail.After_Invoice_Discount_Total};
local numbervar ipart;
local numberVar decpart;
ipart := int(x);
decpart := x - ipart;
Propercase(Replace(towords(ipart)," and xx / 100","")) & " Dollar" &
if decpart = 0 then "" else " and " & Propercase(Replace(towords(decpart*100)," and xx / 100","")) & " Cent Only";

This is 100 percent correct answer. but problem is if currency type change in my application dollar to Euro how to assign variable in crystal report formula work shop. if currency type change according to my application.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Dec 14, 2018 at 01:55 PM

    Hi Zahid,

    Do you have a database field to identify the Currency?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 16, 2018 at 04:41 AM

    Database fields

    CountryCurrency 'Suppose Dollar / Euro

    CurrencySubunit 'Suppose Cent / Penny

    These two field define in database

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2018 at 10:29 AM

    Database fields

    CountryCurrency 'Suppose Dollar / Euro

    CurrencySubunit 'Suppose Cent / Penny

    these two field define in database

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 17, 2018 at 12:37 PM

    Abhilash

    Check this how to add database fields in formula

    CountryCurrency 'Suppose Dollar / Euro

    CurrencySubunit 'Suppose Cent / Penny

    local numbervar x := {Invoice_Detail.After_Invoice_Discount_Total};
    local numbervar ipart;
    local numberVar decpart;
    ipart := int(x);
    decpart := x - ipart;
    Propercase(Replace(towords(ipart)," and xx / 100","")) & " Dollar" &
    if decpart = 0 then "" else " and " & Propercase(Replace(towords(decpart*100)," and xx / 100","")) & " Cent Only";

    Add comment
    10|10000 characters needed characters exceeded