Formatting Variables Output
How do you format a variable? I have created a new variable as follows:
if Gltrans['Amount']>0 then
begin
variable3.visible:=true;
Value :=Gltrans['Amount'];
end else
begin
if (Gltrans['Amount']<=0 then
begin
value :=0
end else
begin
variable3.visible:=false;
value:=0;
end;
end;
However, when I right click on the variable in the design tab, and selet
'format', I only get date/time options rather than currency options.
Any advice would be appreciated.
Best regards, Mike Champion.
if Gltrans['Amount']>0 then
begin
variable3.visible:=true;
Value :=Gltrans['Amount'];
end else
begin
if (Gltrans['Amount']<=0 then
begin
value :=0
end else
begin
variable3.visible:=false;
value:=0;
end;
end;
However, when I right click on the variable in the design tab, and selet
'format', I only get date/time options rather than currency options.
Any advice would be appreciated.
Best regards, Mike Champion.
This discussion has been closed.
Comments
You need to change the TppVariable.DataType to dtCurrency. This can be done
using the Delphi ObjectInspector, by using the DataType pull down menu at
the top left of the Report Designer or at runtime in code. Once you set the
correct datatype, the display format options will change to different types
of currency formats.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com