CrDBGrid summary values with float fields

CrDBGrid summary values with float fields

Postby hotdog » Sun 22 Jan 2006 14:13

If a column holds the data of a standard double(15,3) mysql field and the sum of it's values is ((-10 < sum) or (sum > 10)) at that case the sum of values is rounded to the nearest integer value. For example, if the sum is 10.2 I see the integer part (10) without any decimal places in the grid's summary row. Please note that the values I use in this particular project have one decimal point. I haven't checked the behaviour with values of bigger precision.

I set the columns[]->floatprecision and the columns[]->floatdigits properties to "1" with no luck at all. The columns[]->floatformat doesn't help too.

Getting by code the Columns[]->TotalValue works as expected. However, the Columns[]->TotalString displays the same rounded value as the grid does.

Please help if I'm missing something here.

Thanks in advance,
Chris
hotdog
 
Posts: 3
Joined: Thu 19 Jan 2006 07:15
Location: Greece

Postby Ikar » Mon 23 Jan 2006 15:11

The FloatPrecision property points to total count of digits: before floating point and after floating point but without floating poin itself. To show 10.2 you should type columns[]->floatformat = 3, to show 100.54 value 3+2=5 is correct.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components