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

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

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

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1940
Joined: 17.01.2011, 14:17

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

Post 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.
User avatar
ribut
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 03.02.2017, 08:30

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

Post 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
Post Reply