Reputation: 8772
Is is possible to show optional decimal numbers for the values in the graph? I want to show up to 2 decimal values but only if the user inputs them. If the value is 9.34, I want it to show that. But if the value is just 9, I want it to show just 9. If the users types 9.3 then only that should be shown.
Upvotes: 0
Views: 822
Reputation: 10880
You can accomplish that by converting the decimal value to a string and then using format characters like this:
=Format(CStr(Fields!a.Value),"#.##");
The #
character will only diplay if a decimal value exists. ( fyi, if you wanted the opposite from the format string, using 0.00 would force display zero's even if the values were integers ).
You can also use a combination such as 0.## or 0#.##
Further:
You can also just place that format string in the Custom option under Number in properties.
Upvotes: 3