Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to format TQRExpr

57 views
Skip to first unread message

Nick Ford

unread,
Aug 28, 2000, 3:00:00 AM8/28/00
to
Hi

How do you format the result of a float expression to show 2 decimal places,
comma thousand separator, and currency symbol?

Many thanks

Nick

Max Topley

unread,
Aug 28, 2000, 3:00:00 AM8/28/00
to
float money ;
AnsiString str = CurrToStrF( money, ffCurrency, 2) ;

This will format a currency amount with 2 decimal places.
What currency symbol it shows, and whether it uses commas, is controlled by
locale settings. These are set globally with Control Panel/Regional
Options/Currency.

HTH,
Max.

------------------------------------

"Nick Ford" <ni...@nonesuch.screaming.net> wrote in message
news:8odu80$iq...@bornews.borland.com...

Nick Ford

unread,
Aug 28, 2000, 3:00:00 AM8/28/00
to
Thanks - but how do I get that to work with a TQRExpr?

I have a TQRExpr whose Expression property is set to

SUM(qryStatement.Deposit)

Please, how do I apply a formatting function to that property?

Nick

Thierry Andry

unread,
Aug 29, 2000, 3:00:00 AM8/29/00
to

Nick Ford a écrit dans le message <8oeatq$n5...@bornews.borland.com>...

>I have a TQRExpr whose Expression property is set to
>
>SUM(qryStatement.Deposit)
>


FORMATNUMERIC(String pattern, float)

just call the format function built with string operator

See QReport help for more details about String pattern

Nick Ford

unread,
Aug 30, 2000, 3:00:00 AM8/30/00
to
Thanks Thierry

but I can't crack this problem. I set the Expression property to the
following but it doesn't work:

FORMATNUMERIC("#,##0.00", SUM(qryStatement.Deposit))

I can only find limited help on this in my documentation so I'm struggling!

Many thanks

Nick

jca...@gmail.com

unread,
Mar 3, 2015, 3:16:17 PM3/3/15
to
El lunes, 28 de agosto de 2000, 3:00:00 (UTC-4), Nick Ford escribió:
> Hi
>
> How do you format the result of a float expression to show 2 decimal places,
> comma thousand separator, and currency symbol?
>
> Many thanks
>
> Nick

in properties MASK put the format ###,##0.00
0 new messages