December 17, 2008 at 4:08 pm
I am trying to format a number -251 to (251)
But using the =formatnumber(Fields!Collection.Value,"Currency")
i am getting ($251.00)
I want to see (251)
No negative , no decimal, no dollar. I have set the format to C0.
Can any one tell me how to get (251) if 251 is negative.
thank you
December 17, 2008 at 5:22 pm
Don't format it to currency?! Just format it to number or leave it as its default.
December 18, 2008 at 4:17 am
Hi Prashant..
Please try..Abs function..It will convert any neagtive no to a positive no.
eg; You wish to convert -251 to (251)..So you can write an expression as;
="( " & Abs(Fields!MyVal.Value) & " )"
This should help..!! 🙂 🙂
Niraj
December 18, 2008 at 7:59 am
THANK YOU ALL. I got a method. I did not change or add an expression but,in the format properties of the text box I used "#,##;(#,##0)" (without the quotes) and it worked.But I think using the Abs function is more easier.
January 9, 2009 at 4:28 pm
FYI - If you use the abs function (or any expression, i think) instead of using the format property, the number will appear as text if the report is exported to Excel. I always try to use the format property with numbers because most of my users export to excel and frequently do additional analysis there. If I've used an expression to obtain the format, the users are unable to perform calculations because excel sees the data as text.
January 9, 2009 at 6:04 pm
Well I used the format property. I didnt know abt the export to excel constraint.I will use format property henceforth.
thank you
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply