Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 RunningValue Format number

Author  Topic 

Notoook
Starting Member

18 Posts

Posted - 2009-01-28 : 03:48:58
Greetings all,
i've 3 columns in a table

Debit Credit Balance
0 500 -500
600 0 100
0 550 50
0 20 -530

The expression in Balance column is
RunningValue((Fields!VDebit.Value-Fields!VCredit.Value),Sum,"DataSet1)
I want when the result of the RunningValue function is -ve number, be enclosed in brackets, like: (0 - 500) = (500).

I tried to add those brackets, but gives an error
IIF(RunningValue((Fields!VDebit.Value-Fields!VCredit.Value),Sum,"DataSet1) <0,
"(" & RunningValue((Fields!VDebit.Value-Fields!VCredit.Value),Sum,"DataSet1) & ")"
, RunningValue((Fields!VDebit.Value-Fields!VCredit.Value),Sum,"DataSet1))

Thanks a lot.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-28 : 04:04:26
dont change value expression for formatting this. just right click on cell and take cell properties and in format tab give below expression.

="#,###,##0;(#,###,##0)"
Go to Top of Page

Notoook
Starting Member

18 Posts

Posted - 2009-01-28 : 04:23:25
Thanks a million visakh16 , it works!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-30 : 12:47:50
welcome
Go to Top of Page
   

- Advertisement -