cancel
Showing results for 
Search instead for 
Did you mean: 

How to change currency type according to currency

0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Zahid,

Do you have a database field to identify the Currency?

-Abhilash

0 Kudos

Database fields

CountryCurrency 'Suppose Dollar / Euro

CurrencySubunit

0 Kudos

kindly check this formula

Answers (3)

Answers (3)

0 Kudos

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";

0 Kudos

Database fields

CountryCurrency 'Suppose Dollar / Euro

CurrencySubunit 'Suppose Cent / Penny

These two field define in database

0 Kudos

Database fields

CountryCurrency 'Suppose Dollar / Euro

CurrencySubunit 'Suppose Cent / Penny

these two field define in database