decimal places for mulitple currencies in a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

need to format each currency by its decimals in report. e.g= jpy (0
decimals), usd (2 decimals) kuwaiti dinars (3 decimals)

How can i do that
 
If they are in separate textboxes, then just set the Format property of each
textbox. You won't be able to simply set if for Currency, because that will
pick up the Currency settings from the Regional Settings in Control Panel.
Instead, you'll have to define your own format.

If they are all in one textbox, you'll need to do the same thing as
mentioned above with one more detail. You'll need a field to indicate what
the currency is, you'll then need to programmatically change the format of
the textbox based on the value of the currency type field. This could be
done in the Format event of the report's section that the textbox is in.

Sample Formats:
$0.00
¥0 (typed as Alt+0165 then 0)
 
Hi
In the report there is
text coloumn "Currency_ code" (USD;JPY;KW)
and a column "Amount"
What i need is
If cuurency code is = "USD" amount format 5,840.00
if currency code is = "JPY" amount format 5,840
if currency code is = "KWD" amount format 5,840.000

Record source for report data is from a query, where all amounts are stored
as 5840.000.

I AM WRITING A PROGRAME ON FOREIGN EXCHANGE, AND IT IS NOT ADVISABLE TO
DEFINE THE LOGIC ON ALL REPORTS. I NEED THIS INFORMATION BASED ON A DATABASE
MAINTAINED FOR THIS PURPOSE WHERE ALL CURRENCIES AND ITS DECIMALS ARE STORED.
e.g
curr decimals
usd 2
jpy 0
kwd 3

Please help
Thanks
 
In the Format event for the section (probably the Detail section of the
report) try:

Select Case Me.Currency_Code
Case "USD"
Me.Amount.Format = "$#,##0.00"
Case "JPY"
Me.Amount.Format = "¥#,##0"
Case "KWD"
Me.Amount.Format = "#,##0.000"
Case Else
Me.Amount.Format = ""
Me.Amount = "Error"
End Select

If you don't want the currency symbols, just leave them out. I'm not sure
what the symbol is for the Korean money. Also, be aware that the Format may
round-off the numbers if there is data in more decimal places than you are
displaying.
 
Thanks, i will try and let u know the results

Wayne Morgan said:
In the Format event for the section (probably the Detail section of the
report) try:

Select Case Me.Currency_Code
Case "USD"
Me.Amount.Format = "$#,##0.00"
Case "JPY"
Me.Amount.Format = "Â¥#,##0"
Case "KWD"
Me.Amount.Format = "#,##0.000"
Case Else
Me.Amount.Format = ""
Me.Amount = "Error"
End Select

If you don't want the currency symbols, just leave them out. I'm not sure
what the symbol is for the Korean money. Also, be aware that the Format may
round-off the numbers if there is data in more decimal places than you are
displaying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top