Did you set the table-field's property 'Currency' to TRUE?
 
and don't use the $ sign in the format string.
 
Cheers,
 
John.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mark Howard
Sent: Wednesday, 29 November, 2000 11:42
To: Multiple recipients of list delphi
Subject: [DUG]: String Format problem

Hi
 
'nother newbie question.
 
I am reading a QRExpr field in a QuickReport band and want to write it out (to an ascii file) formatted as $##,##0.00, but can't.
 
I have the following:
 
procedure WriteStuff;
var Amt : Currency
 
begin
        Amt := SubTotal.Value.dblResult;
        Write(AsciiFile,CurrToStr(Amt));
end.
 
The output is not in any currenvy format.
 
Have also tried:
 
procedure WriteStuff;
var Amt : String
 
begin
        Amt := FormatCurr('$##,##0.00',SubTotal.Value.dblResult);
        Write(AsciiFile,Amt);
end.
 
This puts the $ in but the output has up to 4 decimal places.
 
Any suggestions?
 
TIA
 
Mark

Reply via email to