Home General

Displayformat without rounding..

edited February 2016 in General
Hi All,

I am using dbisam table where i have currency field and value stored
here are fine, but in reportbuilder when using displayformat for dbtext
= #,0.00;-#,0.00 value are rounded. Is there a way of skipping the
rounding at last digit and just display what's stored, or else removing
the currency sign?

Dataset = 73,13
Reportbuilder = 73,12

If i do not set displayformat it displays correctly but with a currency
sign in front like:
kr 73,13 (guess it's loading from windows locale). I have many reports
so i hope there is simple solution :)

Reportbuilder 17.01.

Thanks in advance,

Hüseyin A.

Comments

  • edited February 2016
    Hi Hüseyin,

    Take a look at the following article on how currency formatting
    currently functions in ReportBuilder and how to alter it to meet your needs.

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

    Best Regards,

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

    Thanks for your mail. I might do things wrong, but i've tried following:

    lcSaveDecimalSeparator := ppFormatSettings.DecimalSeparator;
    lsCurrencyString := ppFormatSettings.CurrencyString;

    ppFormatSettings.DecimalSeparator := ',';
    ppFormatSettings.CurrencyString := 'DKK';

    but it still shows kr. as currency sign when displaying report?

    Regards,
    Hüseyin


  • edited February 2016
    Hi Hüseyin,

    The ppFormatSettings property is used internally by ReportBuilder and
    needs to be kept in sync with the Delphi FormatSettings. Currency
    values however will use FormatSettings to determine currency formatting.
    Try updating the FormatSettings property first.

    FormatSettings.DecimalSeparator := ',';
    FormatSettings.CurrencyString := 'DKK';

    ppFormatSettings := FormatSettings;

    Best Regards,

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

    Thanks, works perfect :)

    Regards,
    Hüseyin

This discussion has been closed.