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

Formatting Currency Symbol

edited March 2005 in General
Hi,

I have added some fields directly from the data base and set the display
format and selected the currency format ($#,#00.00); $#,#00.00 and this
displayes the local currency symbol ok. i.e. in my case the Sterling symbol
(?). I then add a Variable component to sum these fields up. Go the display
format and find the currency is not in the list so I type in the required
format. Run the report all it does is diaply the format mask as is without
the '#' and '0' replacing them with spaces instead.

Okay so this is a problem so as a work around for the time being I thought I
would use RAP and sum up the values manually and then use formatcurr to
format the double into a string with the local curency symbol. I tryed
sending this formatted sring to a Label and a variable. The variable just
wold not display it correctly and the lable displayed the '$' symbol instead
of the pound '?' symbol.

Any sugestions as to why the variable is not formatting correctly? Why
FormatCurr is not using local settings and assuming were all Americans?

Thanks

Si

Comments

  • edited March 2005
    I forgot to mentions as well its Delphi 7 Ent and Report builder 7 Ent

  • edited March 2005
    Hi Si,

    What type is your variable set to? If it is a string type (dtString),
    ReportBuilder will format the text using the FormatMaskText method. If you
    change your varialbe to a numeric or currency type, you should be able to
    format it correctly.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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