| Author |
Topic  |
|
|
helixpoint
Constraint Violating Yak Guru
252 Posts |
Posted - 06/19/2012 : 09:35:35
|
I do not want commas if the number is above a thousand, but this does not even give me the decimals.
I need it to look like 12345.23
=iif(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value <=0,"$" & FORMAT(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value, "######.##")
Dave Helixpoint Web Development http://www.helixpoint.com |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 06/19/2012 : 10:14:15
|
quote: Originally posted by helixpoint
I do not want commas if the number is above a thousand, but this does not even give me the decimals.
I need it to look like 12345.23
=iif(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value <=0,"$" & FORMAT(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value, "######.##")
Dave Helixpoint Web Development http://www.helixpoint.com
Is that the expression in its entirety? I may be reading it wrong, but you don't seem to have the part that specifies what should happen if the boolean evaluates to false - i.e., if reportitems!Avail_IN.Value - reportitems!Avail_Out.Value is greater than zero. |
 |
|
|
helixpoint
Constraint Violating Yak Guru
252 Posts |
Posted - 06/19/2012 : 10:30:05
|
I am trying.. =iif(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value <=0,"$" & code.DecimalFormat(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value) & "CR" , "$" & code.DecimalFormat(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value))
Public Function DecimalFormat(v as string) As string return Format(v, "N2") End Function
quote: Originally posted by sunitabeck
quote: Originally posted by helixpoint
I do not want commas if the number is above a thousand, but this does not even give me the decimals.
I need it to look like 12345.23
=iif(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value <=0,"$" & FORMAT(reportitems!Avail_IN.Value - reportitems!Avail_Out.Value, "######.##")
Dave Helixpoint Web Development http://www.helixpoint.com
Is that the expression in its entirety? I may be reading it wrong, but you don't seem to have the part that specifies what should happen if the boolean evaluates to false - i.e., if reportitems!Avail_IN.Value - reportitems!Avail_Out.Value is greater than zero.
Dave Helixpoint Web Development http://www.helixpoint.com |
 |
|
|
helixpoint
Constraint Violating Yak Guru
252 Posts |
Posted - 06/19/2012 : 10:35:42
|
Got it
Public Function DecimalFormat(v as decimal)As string return v.ToString("0.00") End Function
Dave Helixpoint Web Development http://www.helixpoint.com |
 |
|
| |
Topic  |
|