Re: In Lazarus 2.0.6 DBGrid display format ,0.00;-,0.00;
Posted: 10.05.2020, 11:50
@ribut
no rolling back to 7.2 shouldn't be an option. Your first choice should be file a bugreport to FPC bugtracker. Others may run into same issue. Your syntax is very rare and i didn't know it before. The difference between 7.2 and 7.4 for you is 7.3 is unsing the FmtBCD fields while 7.2 uses the FloatFields for NUMERIC(22,4) which leads to precsion loss.
As a workaround you can use The TDBGrid GetText(no clue if it's named like this) method, test if the value is zero, if so blank the text.
no rolling back to 7.2 shouldn't be an option. Your first choice should be file a bugreport to FPC bugtracker. Others may run into same issue. Your syntax is very rare and i didn't know it before. The difference between 7.2 and 7.4 for you is 7.3 is unsing the FmtBCD fields while 7.2 uses the FloatFields for NUMERIC(22,4) which leads to precsion loss.
As a workaround you can use The TDBGrid GetText(no clue if it's named like this) method, test if the value is zero, if so blank the text.