Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!!! Currency Symbol enabled in CRXI

Status
Not open for further replies.

karnd

Programmer
Feb 1, 2003
190
0
0
US
Hi,

I have "Amount" field in "money" datatype and "Currency Symbol" field in "varchar" datatype.

Note:The requirement is
1)The amounts are coming in different currencies like '€','$','£' so it has to handle and
2)Negative amounts should be displayed in brackets like (€1000)

so could not able to format it in CRXI using the Format Editor to display multiple currencies.

any ideas should be really appreciated.

Thanks a lot
Regards,
 
You don't say what you want to do, just that you want to handle...If it's just combining the symbolKeep in mind that what you're going to do is build a string.

So try something like a formula of:

if {table.amount} > 0 then
{table.sumbol} & replace(totext({table.amount}),"$","")
else
"(" & {table.sumbol} & replace(totext({table.amount}),"$","") & ")"

-k
 
Hi,

I got it but how should i truncate digits after decimal using the above formula.

like 12345.56 has to shown as 12345
i have tried truncate and round functions but not helped me out.

thanks a lot for your kind help.
regards,
 
if {table.amount} > 0 then
{table.sumbol} & replace(totext(truncate({table.amount},0)),"$","")
else
"(" & {table.sumbol} & replace(totext(truncate({table.amount},0)),"$","") & ")"

Note your original post didn't share this need, in the future try posting example data and expected output rather than a few ambiguous words about what might be done.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top