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

currency rounding error

edited March 2006 in General
Using RB Enterprise 7.03 I have a list of currency values which
display properly rounded in a report. Using the a variable of
type sum though does not sum the rounded values but rounds the
final sum and is in error. For instance

5.957 rounds to 5.96 and 0.595 rounds to 0.60 (bankers rounding
0.5 to nearest even integer) so the sum should be £6.56. In fact
the sum shows as £6.55 (accurate (ie 6.552 rounds to 6.55) but
since the rounding has occurred in the items it is in error.

Comments

  • edited March 2006
    Hi Pat,

    Please try downloading the latest version of ReportBuilder and test the
    rounding with that. We have made a few changes to the way currencies are
    handled since RB 7.03. You could also take a look at the
    ppDisplayFormat.pas file for the logic we use to round currencies based on a
    given display format.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    I just read this. I have Delphi 6 and RB Enterprise 7.03. I can
    see RB7.04 for Delphi 5 but not for Delphi 6. What can I
    donwload?
This discussion has been closed.