Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Problem using displayformat with dollar currency...

edited December 2012 in General
Hello,

I'm trying to use a displayformat like this

#,0.00 $;-#,0.00 $

but this seems not to work.
The amount (440,45) is showed like "440,4500 €". "€" is the normal currency
used in most cases.

If I use any other currency code, for instance "SFr" or "kr", everything is
working fine.

Is there a way to use "$" in DisplayFormat?

Comments

  • edited December 2012
    Hi Mark,

    Once the "$" character is encountered in the display format string, the
    value is considered a currency and formatted with the currency settings
    of the current locale.

    You can alter the way this is done in ReportBuilder by replacing the
    TppDisplayFormat class or by altering the default currency character.

    http://www.digital-metaphors.com/rbWiki/Design/Formatting/Currency_Formatting



    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2015
    Hello,

    the list of changes for version 16.01 says:
    "DisplayFormat, Use FormatCurr when format contains CurrencyString"

    Does that mean, that no workaround is needed anymore to solve the issue
    described below? How would it work now?

    Best regards,
    Mark

    Am 17.12.2012 um 15:22 schrieb Nico Cizik (Digital Metaphors):
  • edited February 2015
    Hi Mark,

    ReportBuilder still uses the currency symbol defined by the system (or
    manually with the FormatSettings object). If you look at the source for
    the TppDisplayFormat.Format routine, you will see that we manually
    replace the "$" symbol with the machine's currency symbol before calling
    FormatCurr.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.