Page 2 of 2

Re: In Lazarus 2.0.6 DBGrid display format ,0.00;-,0.00;

Posted: 10.05.2020, 11:50
by EgonHugeist
@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.

Re: In Lazarus 2.0.6 DBGrid display format ,0.00;-,0.00;

Posted: 10.05.2020, 15:51
by marsupilami
aehimself wrote: 08.05.2020, 21:39 <Completely OFF>
I do ENVY those great-looking DBGrid components! I wish Embardero would invest in making their components look a little bit more... modern.
I had to write a DBGrid descendant to fix some scrolling / painting issues and it makes me so sad that a paid product is ages in front of something freely available...
</Completely OFF>
I might be wrong, but they most probably are not part of the out of the box experience with Lazarus.

Re: In Lazarus 2.0.6 DBGrid display format ,0.00;-,0.00;

Posted: 10.05.2020, 18:48
by ribut
After I try again with numeric data type (19,4). DBGrid has produced what it wants.

Maybe this is my carelessness using numeric data types (22,4)

My conclusion, use numeric types only until (19, xx)

Thank you for your attention, Michael

Regards