Accounting number formats

(3 posts) (2 voices)

Tags:

No tags yet.

  1. harpef, Member

    Hi -

    Could you tell me if I can set a colstyle so that negative numbers are shown in accounting format in parentheses like this: (£100.00).

    I am trying this:

    select 'dbr.colstyle', '[dis]', '£%.2f;£%.2f;(£%.2f)';

    BUT, when I get a negative number it comes out with the negative sign ie: (£-100.00).

    I need to lose the negative sign.

  2. myDBR Team, Key Master

    There is no printf format for negative numbers without negative sign. You would need to create a function which formats the value for you.

    We can take a look if there is something that we can do about it.

    --
    myDBR Team

  3. myDBR Team, Key Master

    Hi,
    newly released myDBR 4.5.5 extends the printf format allowing for you to use formatting:

    select 'dbr.colstyle', '[dis]', '£%.2f;£%.2f;(£%.2N)';

    Where "%.2N", when used in negative format, displays the value as a positive number while retaining the negative number characteristics (sorting).

    --
    myDBR Team


Reply

You must log in to post.