HideZeros
BJL
Brussels, Belgium
I have a case, where I want not to print zeros (0.00).
The property HideZeroes has been set to true. However, I still get 0.00.
What else should be done to really hide zeros?
Thanks
BJL
The property HideZeroes has been set to true. However, I still get 0.00.
What else should be done to really hide zeros?
Thanks
BJL
Comments
is the value a true 0 or a decimal like 0.0001 and memo's display format is set to 2 decimals?
Version 4.4.47
TfrxMemoView
DisplayFormat:
fkNumeric
%2.2n
DecimalSeparator ,
Of course, it is always possible to test the value and make the Memo invisible, when 0.
Regards
BJL
It was due to the use if the function f_if in an SQL-request. Adding a cast solves the problem.
Like
cast(f_if(L.DC,'>',0,L.montant, 0) as NUMERIC(15,2)) as MTD
BJL
yes it is a usual problem with currency values even though display prop is 2 decimals
the underlying value holds at least 4 places so depending upon calculations (usually taxes) a stored value may actually be 0.0010 or more decimals depending upon the precision the dbengine uses for currency fields.
In my case, it was a true 0. But the function f_if returns a string, well recognized by Fastreport under the format fkNumeric. But the Hidezero does not work if the value is a string. So the cast is necessary.
BJL