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

Currency symbol

edited June 2006 in General
Howzit,

using RB10.01 with delphi 7.

Is there any way of telling a TppReport or TppArchiveDevice which currency
symbol to use for it's currency displays. I think now it is using Delphi's
CurrencyString. I have a problem with using this as my app is
multi-threaded, with potentially a different currency symbol per thread.

Regards,
Gilbert

Comments

  • edited June 2006

    See ppDisplayFormat.pas. You can easily create a descendant of
    TppDisplayFormat and specify that your TmyDisplayFormat be used by
    ReportBuilder to perform formatting. See the initialization section
    ppDisplayFormat.pas.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    Yeah, that class will be useful - esp. for the lists of available display
    formats. Unfortunately, it is just a wrapper for class functions, and does
    not help my threading issue - have got around that by using windows' thread
    local storage. Made some changes in my descendent that you may be interested
    in:

    TppDisplayFormat did not support hard-coding $ currency - always treats $ as
    a soft symbol - even when specifying "$" (in quotes).
    The display examples in the lists of formats now show currencies as they
    would appear (i.e. with the correct currency symbol)
    TppDisplayFormat puts a space between the currency symbol and the number if
    that is specified in the regional settings (i.e. types 2&3 for positive
    values - "$ 1.1" & "1.1 $"). Have changed this so that the currency format
    output is exactly what the mask specifies.
    Have introduced a "d" format specifier for currencies that causes the format
    to use the number of decimal places specified in the regional options - '$
    #,0.d;-$ #,0.d'
    Not yet done, but will build in locale-sensitive date examples, e.g. in most
    cases the standard date format is day-month-year, but in some locales (like
    USA) - is month-day-year.


  • edited June 2006
    i guess these newsgroups are not the place for improvement suggestions
    then...
    will save me some time in the future.



  • edited June 2006

    Sorry to not respond sooner. It sounded like you were moving forward, so I
    did not respond initially due to time constraints. Then I just forgot to
    come back to it. Thanks for the reminder.

    - Improvements are always welcome, please send suggestions to
    support@digital-metaphors.com. Keep in mind that anything we implement in RB
    must preserve backward compatibility for existing reports as well taking
    things forward.

    - The .NET framework has a CultureInfo class that is used to describe the
    local. Each Thread instance has a CurrentCulture property that can be used
    for localization. Perhaps with the Thread Local Storage you are approaching
    it in the same manner. We have not tried to implement this type of
    architecture - but again suggestions are quite welcome. :)





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    no problem man,
    always moving forward
    doing what i can
    to keep the current culture wayward

    intereseting about .net
    from communication i retire
    you, i do not get
    but to that i aspire



  • edited June 2006

    Great post - you are a poet!



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.