I have a formula called Sales_Total that, at times, can exceed 11 characters in length but the cell width only allows for 11 characters. When this happens, the report returns ######## instead of the amount. What I'd like to do is evaluate the number of characters in the total and if the character length is greater than or equal to 12, display the number without the decimals. So if my total is 123456789.00, which currently returns ########, I want to suppress the .00 so it will show 123456789. If the number is less than or equal to 11, I want it to include the decimals. So if the total is 12345.00, I want it to show 12345.00.
I tried the following in a formula called Sales_Total (LEN) but it's always suppressing the decimals, regardless of the length, and I can't figure out why.
if len(totext({@Sales_Total})) >= 12 then totext({@Sales_Total},0,"") else
if len(totext({@Sales_Total})) < 12 then totext({@Sales_Total},0.00,"")
I tried the following in a formula called Sales_Total (LEN) but it's always suppressing the decimals, regardless of the length, and I can't figure out why.
if len(totext({@Sales_Total})) >= 12 then totext({@Sales_Total},0,"") else
if len(totext({@Sales_Total})) < 12 then totext({@Sales_Total},0.00,"")