Board index » delphi » Paradox: specify decimal places

Paradox: specify decimal places

Hi:

How do you specify 2 decimal places in a Paradox Table? I want my Qty
field to be shown always in format xxxxx.aa where aa is always shown
even if they are 0.
If i make the field $, then it works this way. But that is a Quantity
field, I cannot
make it $. Any suggestion? The reason for this is that in a TDBGrid, the
Qty column looks bad if it is show like the left side: I like to show it
as the right side.

4.5                                                            4.50

12.21                                                         12.21
                                      7
etc.                                                  7.00    etc.
I tried to set the Tcolumn.Fild.EditMask to  '9999999\.00;0 ';  for the
TDBGrid but it
did not work (i get invalid floating point value error).
Thanks in advance
Enrico

 

Re:Paradox: specify decimal places


use display format..... 0.00

that should do it.....

ALex E

Quote
Enrico P. <eperg...@sympatico.ca> wrote in message

news:3877C94F.67BDDB42@sympatico.ca...
Quote
> Hi:

> How do you specify 2 decimal places in a Paradox Table? I want my Qty
> field to be shown always in format xxxxx.aa where aa is always shown
> even if they are 0.
> If i make the field $, then it works this way. But that is a Quantity
> field, I cannot
> make it $. Any suggestion? The reason for this is that in a TDBGrid, the
> Qty column looks bad if it is show like the left side: I like to show it
> as the right side.

> 4.5                                                            4.50

> 12.21                                                         12.21
>                                       7
> etc.                                                  7.00    etc.
> I tried to set the Tcolumn.Fild.EditMask to  '9999999\.00;0 ';  for the
> TDBGrid but it
> did not work (i get invalid floating point value error).
> Thanks in advance
> Enrico

Re:Paradox: specify decimal places


Instantiate your field objects at design time using the Fields Editor.
Select the field object for the Quantity field and set the DisplayFormat
property in the Object Inspector.

--
Bill

Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)

Re:Paradox: specify decimal places


In DBD try changing the fieldtype from Number to #(BCD) and enter 2 for the
Size.

Quote
Enrico P. wrote:
> Hi:

> How do you specify 2 decimal places in a Paradox Table? I want my Qty
> field to be shown always in format xxxxx.aa where aa is always shown
> even if they are 0.
> If i make the field $, then it works this way. But that is a Quantity
> field, I cannot
> make it $. Any suggestion? The reason for this is that in a TDBGrid, the
> Qty column looks bad if it is show like the left side: I like to show it
> as the right side.

> 4.5                                                            4.50

> 12.21                                                         12.21
>                                       7
> etc.                                                  7.00    etc.
> I tried to set the Tcolumn.Fild.EditMask to  '9999999\.00;0 ';  for the
> TDBGrid but it
> did not work (i get invalid floating point value error).
> Thanks in advance
> Enrico

  vcard.vcf
< 1K Download

Other Threads