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

Display Format Negative Numbers

edited March 2002 in General
When I select the following as the display format -> $#,0;-$#,0 the report
shows parenthesis around negative values. How do I force the report to use
the negative symbol instead of parenthesis?
I posted this same post about a year ago. The reply came that it was
because of the global settings of the computer and the only resolution was
to go in and edit an event.

I don't want to have to do this. I am saving my reports in a blob field and
I download the report design to the client through a remote connection in a
database stream. I cannot change each clients global settings, and I do not
want to compile all of my applications reports with the executeable so they
can format correctly. I am going to be adding reports to the library the
client can select from and so I do not want to have to redistribute an
application just to fix this problem.

Comments

  • edited March 2002
    The display format is controlled by the Regional Options in Control Panel
    which determine how negative currency is formatted. Thus if that option is
    set to use parenthesis, they will be used even if the display format is
    $#,0;-$#,0. A quick workaround is to use the #,0;-#,0 so the value is not
    treated as currency. Then manually add the dollar sign. You can also take a
    look at www.digital-metaphors.com/tips/ReplaceDisplayFormats.zip for another
    example that handles this situation.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited March 2002
    My two cents...
    I think it is pointless to list a possible display format in the list of
    types if you are going to still use the region settings of the machine. If
    Report Builder is going to offer an option I think it should be implemented
    even to override the region settings if the option is selected. What is the
    point in offering it if in the end the programmer still has to implement it?

    Bill

  • edited March 2002
    Currently ReportBuilder relies on Delphi formatting functions which in turn
    make Win32 API calls. The Win32 calls use the operating system formatting
    settings. Perhaps in a future version we can consider writing our own
    formatting functions and not rely on the operating system settings.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited March 2002
    I don't think this is strictly correct. There are global variables in
    Delphi allowing you to override the OS global settings for currency
    formatting.

    Regards

    Stuart

    --
    Stuart Seath
    Seath Computer Services
    (mailto:stuart.seath@seath.co.uk)
This discussion has been closed.