Format numbers based on value
- Create Function in Code property
Public Function GetFormattingBasedOnValue(ByVal Value As Decimal)
if (Round(Value, 1) - Floor(Value)) = 0 then
Return "#,0;-#,0;''"
end if
Return "#,0.0;-#,0.0;''"
End Function
Code.GetFormattingBasedOnValue(ReportItems!{Your TextBox Name}.Value)
- Name the TextBox you wish to format
- Write the format expression
Public Function GetFormattingBasedOnValue(ByVal Value As Decimal)
if (Round(Value, 1) - Floor(Value)) = 0 then
Return "#,0;-#,0;''"
end if
Return "#,0.0;-#,0.0;''"
End Function
Code.GetFormattingBasedOnValue(ReportItems!{Your TextBox Name}.Value)