EhLib.Com
https://forum.ehlib.com/en/

Problem in DisplayFormat
https://forum.ehlib.com/en/viewtopic.php?f=5&t=1187
Page 1 of 1

Author:  jsm [ 27 Nov 2022, 12:28 ]
Post subject:  Problem in DisplayFormat

I Set Footers to:
DisplayFormat:= '###,###,###,###,###'
but show dot(.) in end of numbers

Attachments:
Bug.png
Bug.png [ 699 Bytes | Viewed 1231 times ]

Author:  EhLibSupport [ 30 Nov 2022, 07:10 ]
Post subject:  Re: Problem in DisplayFormat

Hello

I can't reproduce the problem in
EhLib 10.2 Build 10.2.035
Delphi 11.2

Attachments:
sshot-283.png
sshot-283.png [ 80.95 KiB | Viewed 1211 times ]

Author:  jsm [ 05 Dec 2022, 11:28 ]
Post subject:  Re: Problem in DisplayFormat

plz check your Demos
Change DisplayFormat to ###,###,###,###

Attachments:
Error.jpg
Error.jpg [ 250.19 KiB | Viewed 1191 times ]

Author:  EhLibSupport [ 06 Dec 2022, 20:29 ]
Post subject:  Re: Problem in DisplayFormat

Checked

Attachments:
sshot-286.png
sshot-286.png [ 144.66 KiB | Viewed 1181 times ]

Author:  jsm [ 07 Dec 2022, 06:17 ]
Post subject:  Re: Problem in DisplayFormat

So please help me, which Property I have set wrong

Attachments:
Error1.png
Error1.png [ 107.76 KiB | Viewed 1171 times ]

Author:  EhLibSupport [ 07 Dec 2022, 11:41 ]
Post subject:  Re: Problem in DisplayFormat

Hello

There is a bug in Data.FmtBcd.FormatBcd function Delphi 10.2
https://quality.embarcadero.com/browse/ ... rmatBcd%22

If you use Delphi 10.2 you need to make a fix in EhLib to get around this VCL bug.

Code:
function TCustomDBGridEh.GetFooterValue(Footer: TColumnFooterEh; Column: TColumnEh): String;
...
          if FmtStr <> '' then
            // VCL bug bypass
            //Result := FormatBcd(FmtStr, VarToBcd(v))
            Result := FormatFloat(FmtStr, BcdToDouble(VarToBcd(v)))
          else
            Result := BcdToStrF(VarToBcd(v), Format, Precision, Digits);
...

Author:  jsm [ 08 Dec 2022, 07:39 ]
Post subject:  Re: Problem in DisplayFormat

thank you
problem solved

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/