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

Positive number only in Display Format??

edited February 2004 in General
How can I show the absolute value in Calc components using the display
format. I do not want to show the negative sign if the number is less than
0. I have tried #,0.00 rather than #,0.00;-#,0.00 but this still shows the
negative sign.

Comments

  • edited March 2004
    I don't know how to do that with the display format string, I tok a look in
    the FormatFloat Function, but you can do this in the OnCalc/OnBeforePrint
    Event:

    if YourNumber < 0 then
    begin
    Value := YourNumber * -1;
    end;


  • edited March 2004
    Hi Jarrod,

    You still need to define the negative number format or else it will use the
    default. Try using something like the following...

    #,0.00;#,0.00

    --
    Best Regards,

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