Skip to Content

result value is negative should display in closed brackets

Hello All,

i have a result column sometimes it display negative/ positive values depends on the transactions.

when i get the negative value it should come in closed brackets ex: (-1,16,000)

when i get the positive value it should display like this : (1,16,000)

Can anybody tell me how to do this with the code?

Thanks

Paturi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 10, 2017 at 11:32 AM

    Hi Paturi,

    The example you posted above has closed brackets for both negative and positive. Is that a typo?

    Here's the easiest way to format numbers without code:

    Right-click the field > Format Field > Number tab > Select a format with parenthesis.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Abhilash,

      Yes. Thats a typo. sorry my mistake.

      when i get the negative value it should come in closed brackets ex: (-1,16,000)

      when i get the positive value it should display like this : 1,16,000

      I cant format field because for positive values also it shows the closed brackets.

      closed brackets should show only for negative values. Any help ?

      Thanks

      Paturi

  • Nov 13, 2017 at 09:26 AM

    Hi Paturi,

    What is the datatype of this field?

    Could you share the .rpt with saved data?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2017 at 06:11 AM

    Hello Abhilash

    Thank you for the reply. The source data is coming from the calculation view HANA. I have done a calculation for RBD column. The difference between payments total and receipts total. If the value is positive then leave as it is. If the value is negative then the value should display in closed brackets. Here is below showed in the screenshot.

    Here is the screenshot.

    negative-value.png

    Thanks

    Paturi

    Add comment
    10|10000 characters needed characters exceeded