Board index » delphi » Problems with decimals and anonther small problem

Problems with decimals and anonther small problem

Hey,

I'm using Delphi3.0 and I've some problems with it.

Problem number 1 :
How can I make that a qrlabel has two decimals(213,56 or 56,67)
example:
If i do 11/3 my delphi says it is  3,666666666667.
How can i make 3,67 from this?

Problem number 2 :
When I finished my program (with databases) and I
want to install the program at my friends pc (who has not delphi) it
isn't working (but at my other friends pc, who has delphi it is
working????????). Some thing to do with dll files???????(if you know
which dll files tell me please)

Please mail me or post a follow up.
Thanks,
Brenda_vd_B...@hotmail.com

 

Re:Problems with decimals and anonther small problem


Quote
Tom wrote in message <34A3B006.9CDAF...@kabelfoon.nl>...
>How can I make that a qrlabel has two decimals(213,56 or 56,67)
>example:
>If i do 11/3 my delphi says it is  3,666666666667.
>How can i make 3,67 from this?

check the Format function in online help.

Quote
>Problem number 2 :
>When I finished my program (with databases) and I
>want to install the program at my friends pc (who has not delphi) it
>isn't working (but at my other friends pc, who has delphi it is
>working????????). Some thing to do with dll files???????(if you know
>which dll files tell me please)

Perhaps the Borland Database Engine ?
Check your deploy.txt file.

--
Grace + Peace | Peter N Roth | Engineering Objects Int'l
Author: "Creating a Robust Type-Safe TList", Delphi Developer Oct 97
Visit our website at http://www.inconresearch.com/eoi
"On the internet, nobody knows you're a dog." - P Steiner

Re:Problems with decimals and anonther small problem


In article <34A3B006.9CDAF...@kabelfoon.nl>, Tom <jabgr...@kabelfoon.nl>
writes

Quote
>Problem number 2 :
>When I finished my program (with databases) and I
>want to install the program at my friends pc (who has not delphi) it
>isn't working (but at my other friends pc, who has delphi it is
>working????????). Some thing to do with dll files???????(if you know
>which dll files tell me please)

Sounds like you have not got the BDE installed on your friends PC.  If
you have installshield express ask it to include it in the build disks.

@@@@

Dave Gill

@@@@

Re:Problems with decimals and anonther small problem


Quote
Peter N Roth wrote:

> Tom wrote in message <34A3B006.9CDAF...@kabelfoon.nl>...

> >How can I make that a qrlabel has two decimals(213,56 or 56,67)
> >example:
> >If i do 11/3 my delphi says it is  3,666666666667.
> >How can i make 3,67 from this?

1) Use the OnPrint event:

..OnPrint( .., var Value : Sring);
begin

Value := FormatFloat(*mask*,StrToFloat(Value));  //e.g : '#,##0.00'

end;

See Online Help on FormatFloat for details.

Other Threads