Skip to Content
0

result value is negative should display in closed brackets

Nov 10, 2017 at 08:11 AM

53

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Abhilash Kumar
Nov 10, 2017 at 11:32 AM
0

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

Show 1 Share
10 |10000 characters needed characters left 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

0
Abhilash Kumar
Nov 13, 2017 at 09:26 AM
0

Hi Paturi,

What is the datatype of this field?

Could you share the .rpt with saved data?

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Pathuri Radhika Nov 15, 2017 at 06:11 AM
0

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


Share
10 |10000 characters needed characters left characters exceeded