Currency format in Text Object
Hi All
I can't correctly format a currency in Object Text.
I have a TextObject in Master Detail call Prezzo. On event OnBeforePrint I have insert a script :
procedure PrezzoOnBeforePrint(Sender: TfrxComponent);
begin
if <Corpo."ArtServ"> = false then
Prezzo.Text:=<Corpo."PrUnitario">
else
Prezzo.Text:=''
end;
where Corpo is a ADOTabe, field PrUnitario is a Valute and field ArtServ is a boolean.
in the option of object, format is CATEGORY : Number FORMAT: $ 1,234.50 and FORMAT STRING: %2.2m
for example if
<Corpo."PrUnitario"> = ??¬ 1250,50
it stamp 1250,50 not ??¬ 1250,50
why???
I can't correctly format a currency in Object Text.
I have a TextObject in Master Detail call Prezzo. On event OnBeforePrint I have insert a script :
procedure PrezzoOnBeforePrint(Sender: TfrxComponent);
begin
if <Corpo."ArtServ"> = false then
Prezzo.Text:=<Corpo."PrUnitario">
else
Prezzo.Text:=''
end;
where Corpo is a ADOTabe, field PrUnitario is a Valute and field ArtServ is a boolean.
in the option of object, format is CATEGORY : Number FORMAT: $ 1,234.50 and FORMAT STRING: %2.2m
for example if
<Corpo."PrUnitario"> = ??¬ 1250,50
it stamp 1250,50 not ??¬ 1250,50
why???
Comments
Dim currency As Decimal
You declared currency as a double. In order for you to string compare "Yen" with currency you need a string data type for currency.
I am using Fast Report studio, 4.8 with VB6.
I want to format number values in report.
The values which are Negative values should be displayed in bracket without "-" sign. and other number values should be formatted as normally i am using to format with %2.2n
Please help, i want to displat -1234.00 to (1,234.00)
and 2345.00 to 2,345.00
I am trying to write VB script in report code window but not getting it to work. PLEASE HELP
Thanks,